Add test data and convert fn.

This commit is contained in:
chmod777 2021-02-24 04:21:26 +00:00
parent 9e20d59c10
commit a0ed712d2b
12 changed files with 119 additions and 0 deletions

14
src/lib.rs Normal file
View File

@ -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
}

13
src/tests/data/br.html Normal file
View File

@ -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>

View File

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<title>empty</title>
</head>
<body>
</body>
</html>

9
src/tests/data/h1.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Header 1</title>
</head>
<body>
<h1>Header 1</h1>
</body>
</html>

9
src/tests/data/h2.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Header 2</title>
</head>
<body>
<h2>Header 2</h2>
</body>
</html>

9
src/tests/data/h3.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Header 3</title>
</head>
<body>
<h3>Header 3</h3>
</body>
</html>

9
src/tests/data/h4.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Header 4</title>
</head>
<body>
<h4>Header 4</h4>
</body>
</html>

9
src/tests/data/h5.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Header 5</title>
</head>
<body>
<h5>Header 5</h5>
</body>
</html>

9
src/tests/data/h6.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Header 6</title>
</head>
<body>
<h6>Header 6</h6>
</body>
</html>

View File

@ -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>

9
src/tests/data/p.html Normal file
View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Paragraph</title>
</head>
<body>
<p>Paragraph</p>
</body>
</html>

10
src/tests/mod.rs Normal file
View File

@ -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);
}