diff options
Diffstat (limited to 'rust/vendor/test-case/tests')
-rw-r--r-- | rust/vendor/test-case/tests/acceptance_tests.rs | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/rust/vendor/test-case/tests/acceptance_tests.rs b/rust/vendor/test-case/tests/acceptance_tests.rs new file mode 100644 index 0000000..af30935 --- /dev/null +++ b/rust/vendor/test-case/tests/acceptance_tests.rs @@ -0,0 +1,56 @@ +#![cfg(test)] + +mod acceptance { + use itertools::Itertools; + use std::env; + use std::path::PathBuf; + use std::process::Command; + + #[test] + fn basic() { + let output = Command::new("cargo") + .current_dir(PathBuf::from("acceptance_tests").join("basic")) + .args(&["test"]) + .output() + .expect("cargo command failed to start"); + + let lines = String::from_utf8_lossy(&output.stdout) + .to_string() + .lines() + .sorted() + .join("\n"); + insta::assert_display_snapshot!(lines); + } + + #[test] + fn hamcrest_assertions() { + let output = Command::new("cargo") + .current_dir(PathBuf::from("acceptance_tests").join("hamcrest_assertions")) + .args(&["test"]) + .output() + .expect("cargo command failed to start"); + + let lines = String::from_utf8_lossy(&output.stdout) + .to_string() + .lines() + .sorted() + .join("\n"); + insta::assert_display_snapshot!(lines); + } + + #[test] + fn r#async() { + let output = Command::new("cargo") + .current_dir(PathBuf::from("acceptance_tests").join("async")) + .args(&["test"]) + .output() + .expect("cargo command failed to start"); + + let lines = String::from_utf8_lossy(&output.stdout) + .to_string() + .lines() + .sorted() + .join("\n"); + insta::assert_display_snapshot!(lines); + } +} |