mirror of
https://github.com/sagiegurari/duckscript
synced 2024-09-06 00:34:07 +00:00
Add tests for camel_case and snake_case
This commit is contained in:
parent
77c3e706bb
commit
d4cb10d3eb
12
test/std/string/camel_case_test.ds
Normal file
12
test/std/string/camel_case_test.ds
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
fn test_without_symbols
|
||||
output = camel_case "hello world 22"
|
||||
|
||||
assert_eq ${output} "HelloWorld22"
|
||||
end
|
||||
|
||||
fn test_with_symbols
|
||||
output = camel_case "hello!@#$% world^&*()[]{}22"
|
||||
|
||||
assert_eq ${output} "HelloWorld22"
|
||||
end
|
12
test/std/string/snake_case_test.ds
Normal file
12
test/std/string/snake_case_test.ds
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
fn test_without_symbols
|
||||
output = snake_case "hello world 22"
|
||||
|
||||
assert_eq ${output} "hello_world_22"
|
||||
end
|
||||
|
||||
fn test_with_symbols
|
||||
output = snake_case "hello!@#$% world^&*()[]{}22"
|
||||
|
||||
assert_eq ${output} "hello_world_22"
|
||||
end
|
Loading…
Reference in a new issue