mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:36:08 +02:00
added various case conversion commands for str. Added the inflection … (#2363)
* added various case conversion commands for str. Added the inflection crate as a dependency * lighten the restriction on the inflector dependency * publishing the case commands * fix typo * fix kebab case test * formatting
This commit is contained in:
@ -97,6 +97,26 @@ fn upcases() {
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn camelcases() {
|
||||
Playground::setup("str_test_3", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContent(
|
||||
"sample.toml",
|
||||
r#"
|
||||
[dependency]
|
||||
name = "THIS_IS_A_TEST"
|
||||
"#,
|
||||
)]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(),
|
||||
"open sample.toml | str camel-case dependency.name | get dependency.name | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "thisIsATest");
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn converts_to_int() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user