Skip to content

Commit e233a39

Browse files
committed
test(cli): run integration tests via langcodec binary
1 parent b8f6363 commit e233a39

11 files changed

Lines changed: 128 additions & 251 deletions

langcodec-cli/tests/android_plurals_cli_tests.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ use std::fs;
22
use std::process::Command;
33
use tempfile::TempDir;
44

5+
fn langcodec_cmd() -> Command {
6+
Command::new(assert_cmd::cargo::cargo_bin!("langcodec"))
7+
}
8+
59
#[test]
610
fn test_cli_view_android_plurals() {
711
let temp_dir = TempDir::new().unwrap();
@@ -17,16 +21,8 @@ fn test_cli_view_android_plurals() {
1721
"#;
1822
fs::write(&input_file, xml).unwrap();
1923

20-
let output = Command::new("cargo")
21-
.args([
22-
"run",
23-
"--quiet",
24-
"--",
25-
"view",
26-
"-i",
27-
input_file.to_str().unwrap(),
28-
"--full",
29-
])
24+
let output = langcodec_cmd()
25+
.args(["view", "-i", input_file.to_str().unwrap(), "--full"])
3026
.output()
3127
.unwrap();
3228

0 commit comments

Comments
 (0)