Add test data and convert fn.
This commit is contained in:
parent
9e20d59c10
commit
a0ed712d2b
|
@ -0,0 +1,14 @@
|
||||||
|
// File: src/lib.rs
|
||||||
|
// Author: chmod777
|
||||||
|
// Creation Date: 2021-2-23
|
||||||
|
// License: AGPLv3
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests;
|
||||||
|
|
||||||
|
pub fn convert(html_src: &str) -> String {
|
||||||
|
let mut gmi_src = String::new();
|
||||||
|
|
||||||
|
|
||||||
|
gmi_src
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Multiple Paragraphs</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Paragraph 1</p>
|
||||||
|
<br>
|
||||||
|
<p>Paragraph 2</p>
|
||||||
|
<br>
|
||||||
|
<p>Paragraph 3</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>empty</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Header 1</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Header 1</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Header 2</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Header 2</h2>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Header 3</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h3>Header 3</h3>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Header 4</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h4>Header 4</h4>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Header 5</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h5>Header 5</h5>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Header 6</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h6>Header 6</h6>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Multiple Paragraphs</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Paragraph 1</p>
|
||||||
|
<p>Paragraph 2</p>
|
||||||
|
<p>Paragraph 3</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Paragraph</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Paragraph</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,10 @@
|
||||||
|
// File: src/tests/mod.rs
|
||||||
|
// Author: chmod777
|
||||||
|
// Creation Date: 2021-2-23
|
||||||
|
// License: AGPLv3
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn it_works() {
|
||||||
|
assert_eq!(2 + 2, 4);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue