Skip to content

Commit 01e5c01

Browse files
committed
fix: fix windows tests
1 parent e6c45cd commit 01e5c01

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/cli_test.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{path::Path, env::current_dir};
1+
use std::{env::current_dir, path::Path};
22

33
use assert_fs::prelude::*;
44

@@ -209,9 +209,10 @@ fn test_cli_case2() -> anyhow::Result<()> {
209209

210210
let binding = git_semver_tags!("--package", "bar-project").err().unwrap();
211211
let output = binding.as_output().unwrap().to_owned();
212+
let suffix = if cfg!(windows) { ".exe" } else { "" };
212213
assert_eq!(
213214
String::from_utf8(output.stderr)?,
214-
"error: The following required arguments were not provided:\n --lerna\n\nUsage: git-semver-tags --lerna --package <package>\n\nFor more information try \'--help\'\n",
215+
format!("error: The following required arguments were not provided:\n --lerna\n\nUsage: git-semver-tags{suffix} --lerna --package <package>\n\nFor more information try \'--help\'\n"),
215216
"should not allow package filter without lernaTags=true"
216217
);
217218
write_file(&temp, "test6", "")?;

0 commit comments

Comments
 (0)