Add test for new crate with hypen

This commit is contained in:
Marsman1996
2024-08-08 16:11:26 +08:00
committed by Tate, Hongliang Tian
parent 923ca16d32
commit 8dc08dccba

View File

@ -1,5 +1,7 @@
// SPDX-License-Identifier: MPL-2.0
use std::fs;
use crate::util::*;
#[test]
@ -50,3 +52,13 @@ fn cli_clippy_help_message() {
assert_success(&output);
assert_stdout_contains_msg(&output, "cargo osdk clippy");
}
#[test]
fn cli_new_crate_with_hyphen() {
let output = cargo_osdk(&["new", "--kernel", "my-first-os"])
.output()
.unwrap();
assert_success(&output);
assert!(fs::metadata("my-first-os").is_ok());
fs::remove_dir_all("my-first-os");
}