Skip to content

Commit 6f8c393

Browse files
committed
Add test for naming of generated packages
1 parent cbb76f0 commit 6f8c393

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,3 +1167,11 @@ fn cargo(
11671167

11681168
Ok(cmd)
11691169
}
1170+
1171+
#[test]
1172+
fn test_package_name() {
1173+
let input = Input::File("Script", Path::new("path"), "script", 0);
1174+
assert_eq!("script", input.package_name());
1175+
let input = Input::File("1Script", Path::new("path"), "script", 0);
1176+
assert_eq!("_1script", input.package_name());
1177+
}

0 commit comments

Comments
 (0)