Forráskód Böngészése

refactor(tests): split trycmd into tests for all, unix and windows

Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Sandro-Alessio Gierens 2 éve
szülő
commit
2338c15f63

+ 16 - 2
tests/cli_tests.rs

@@ -1,5 +1,19 @@
 #[test]
-fn cli_tests() {
+fn cli_all_tests() {
     trycmd::TestCases::new()
-        .case("tests/cmd/*.toml");
+        .case("tests/cmd/*_all.toml");
+}
+
+#[test]
+#[cfg(unix)]
+fn cli_unix_tests() {
+    trycmd::TestCases::new()
+        .case("tests/cmd/*_unix.toml");
+}
+
+#[test]
+#[cfg(windows)]
+fn cli_windows_tests() {
+    trycmd::TestCases::new()
+        .case("tests/cmd/*_windows.toml");
 }

+ 0 - 0
tests/cmd/basic.stderr → tests/cmd/basic_all.stderr


+ 0 - 0
tests/cmd/basic.stdout → tests/cmd/basic_all.stdout


+ 0 - 0
tests/cmd/basic.toml → tests/cmd/basic_all.toml


+ 0 - 0
tests/cmd/icons.stderr → tests/cmd/icons_all.stderr


+ 0 - 0
tests/cmd/icons.stdout → tests/cmd/icons_all.stdout


+ 0 - 0
tests/cmd/icons.toml → tests/cmd/icons_all.toml


+ 0 - 0
tests/cmd/long.stderr → tests/cmd/long_unix.stderr


+ 0 - 0
tests/cmd/long.stdout → tests/cmd/long_unix.stdout


+ 0 - 0
tests/cmd/long.toml → tests/cmd/long_unix.toml


+ 0 - 0
tests/cmd/long_windows.stderr


+ 17 - 0
tests/cmd/long_windows.stdout

@@ -0,0 +1,17 @@
+-a--- a
+-a--- b
+-a--- c
+-a--- d
+-a--- e
+-a--- f
+-a--- g
+-a--- h
+-a--- i
+-a--- j
+-a--- k
+-a--- l
+-a--- m
+-a--- n
+-a--- o
+-a--- p
+-a--- q

+ 2 - 0
tests/cmd/long_windows.toml

@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest --long --no-user --no-time --no-filesize"