summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRazrFalcon <razrfalcon@gmail.com>2018-12-08 13:35:57 +0200
committerRazrFalcon <razrfalcon@gmail.com>2018-12-08 13:35:57 +0200
commit35400e5c970ce3fbfd5c34b223db6397d7496d87 (patch)
tree33d30d3093b3e034067cff071593e2f0bdfee7ab /tools
parentf869da1444d7b811ed04c7063d724204f34c59c9 (diff)
Remove rendersvg tests, because they are useless.
Diffstat (limited to 'tools')
-rw-r--r--tools/rendersvg/Cargo.toml4
-rw-r--r--tools/rendersvg/tests/cli.rs90
-rw-r--r--tools/rendersvg/tests/images/bbox.svg47
-rw-r--r--tools/rendersvg/tests/images/bbox_with_warnings.svg3
-rw-r--r--tools/rendersvg/tests/images/bbox_without_ids.svg3
5 files changed, 0 insertions, 147 deletions
diff --git a/tools/rendersvg/Cargo.toml b/tools/rendersvg/Cargo.toml
index 49f4beb..bc3b4b5 100644
--- a/tools/rendersvg/Cargo.toml
+++ b/tools/rendersvg/Cargo.toml
@@ -16,7 +16,3 @@ time = "0.1"
[features]
cairo-backend = ["resvg/cairo-backend"]
qt-backend = ["resvg/qt-backend"]
-
-[dev-dependencies]
-assert_cli = "0.5"
-indoc = "0.2"
diff --git a/tools/rendersvg/tests/cli.rs b/tools/rendersvg/tests/cli.rs
deleted file mode 100644
index 6c1780b..0000000
--- a/tools/rendersvg/tests/cli.rs
+++ /dev/null
@@ -1,90 +0,0 @@
-extern crate assert_cli;
-#[macro_use]
-extern crate indoc;
-
-use assert_cli::Assert;
-
-const APP_PATH: &str = "../../target/debug/rendersvg";
-
-#[test]
-fn query_all() {
- let args = &[
- APP_PATH,
- "--query-all",
- "tests/images/bbox.svg",
- ];
-
- #[cfg(feature = "cairo-backend")]
- let output = indoc!("
- rect1,10,20,100,50
- rect2,7.5,92.5,105,55
- rect3,7.983,170,128.868,50
- rect4,7.182,242.5,133.868,55
- rect5,9.584,329.203,70.711,70.711
- long_text,10.281,441.953,550.594,10.047
- text1,200.703,23,53.406,22
- text2,200.875,102,32.172,28
- text3,202.311,178,55.692,22
- text4,195.703,243,63.406,32
- text5,206.739,306.299,58.393,26.092
- g1,350,20,100,50
- g2,350,95,120,70
- ");
-
- #[cfg(feature = "qt-backend")]
- let output = indoc!("
- rect1,10,20,100,50
- rect2,7.5,92.5,105,55
- rect3,7.983,170,128.868,50
- rect4,7.182,242.5,133.868,55
- rect5,9.584,329.203,70.711,70.711
- long_text,10.281,441.25,550.203,11.281
- text1,200.703,23.531,54.063,21.828
- text2,200.875,101.375,31.172,28.766
- text3,202.311,178.531,56.068,21.828
- text4,195.703,243.531,64.063,31.828
- text5,206.739,306.759,58.136,25.632
- g1,350,20,100,50
- g2,350,95,120,70
- ");
-
- Assert::command(args)
- .stdout().is(output)
- .stderr().is("")
- .unwrap();
-}
-
-// Check that all warnings are skipped during the ID querying.
-// Some crates still can print to stdout/stderr, but we can't do anything about it.
-#[test]
-fn query_file_with_warnings() {
- let args = &[
- APP_PATH,
- "--query-all",
- "tests/images/bbox_with_warnings.svg",
- ];
-
- let output = indoc!("
- rect1,10,20,100,50
- ");
-
- Assert::command(args)
- .stdout().is(output)
- .stderr().is("")
- .unwrap();
-}
-
-#[test]
-fn query_file_without_ids() {
- let args = &[
- APP_PATH,
- "--query-all",
- "tests/images/bbox_without_ids.svg",
- ];
-
- Assert::command(args)
- .fails()
- .stdout().is("")
- .stderr().is("Error: the file has no valid ID's.")
- .unwrap();
-}
diff --git a/tools/rendersvg/tests/images/bbox.svg b/tools/rendersvg/tests/images/bbox.svg
deleted file mode 100644
index 9b181e0..0000000
--- a/tools/rendersvg/tests/images/bbox.svg
+++ /dev/null
@@ -1,47 +0,0 @@
-<svg width="700" height="500" xmlns="http://www.w3.org/2000/svg" font-family="Arial" font-size="12">
- <text x="10" y="15">Simple rect</text>
- <rect id="rect1" x="10" y="20" width="100" height="50" fill="black"/>
-
- <text x="10" y="90">Rect with stroke</text>
- <rect id="rect2" x="10" y="95" width="100" height="50" fill="none" stroke="black" stroke-width="5"/>
-
- <text x="10" y="165">Rect with transform</text>
- <rect id="rect3" x="10" y="170" width="100" height="50" fill="black" transform="translate(125) skewX(-30)"/>
-
- <text x="10" y="240">Rect with transform and stroke</text>
- <rect id="rect4" x="10" y="245" width="100" height="50" fill="none" stroke="black" stroke-width="5" transform="translate(170) skewX(-30)"/>
-
- <text x="10" y="320">Rect with transform</text>
- <rect id="rect5" x="10" y="300" width="50" height="50" fill="black" transform="translate(250 110) rotate(45)"/>
-
- <text id="long_text" x="10" y="450">THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG the quick brown fox jumps over the lazy dog</text>
-
- <text x="200" y="15">Simple text</text>
- <text id="text1" x="200" y="45" font-size="30">Text</text>
-
- <text x="200" y="90">Multiline text</text>
- <text id="text2">
- <tspan x="200" y="110">Line 1</tspan>
- <tspan x="200" y="130">Line 2</tspan>
- </text>
-
- <text x="200" y="165">Text with transform</text>
- <text id="text3" x="200" y="200" font-size="30" transform="translate(110) skewX(-30)">Text</text>
-
- <text x="200" y="240">Text with stroke</text>
- <text id="text4" x="200" y="270" font-size="30" stroke="black" stroke-width="10">Text</text>
-
- <text x="200" y="300">Text with rotate</text>
- <text id="text5" x="200" y="325" font-size="30" rotate="30">Text</text>
-
- <text x="350" y="15">Simple group</text>
- <g id="g1">
- <rect x="350" y="20" width="100" height="50" fill="black"/>
- </g>
-
- <text x="350" y="90">Group with two children</text>
- <g id="g2">
- <rect x="350" y="95" width="100" height="50" fill="black"/>
- <rect x="370" y="115" width="100" height="50" fill="gray"/>
- </g>
-</svg>
diff --git a/tools/rendersvg/tests/images/bbox_with_warnings.svg b/tools/rendersvg/tests/images/bbox_with_warnings.svg
deleted file mode 100644
index 708749c..0000000
--- a/tools/rendersvg/tests/images/bbox_with_warnings.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg" font-family="Arial" font-size="12">
- <rect id="rect1" x="10" y="20" width="100" height="50" fill="black" style="-webkit:value"/>
-</svg>
diff --git a/tools/rendersvg/tests/images/bbox_without_ids.svg b/tools/rendersvg/tests/images/bbox_without_ids.svg
deleted file mode 100644
index ab83448..0000000
--- a/tools/rendersvg/tests/images/bbox_without_ids.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="500" height="500" xmlns="http://www.w3.org/2000/svg">
- <rect x="10" y="20" width="100" height="50" fill="black"/>
-</svg>