mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 14:01:20 -03:00
Add some tests for string and NUL
This commit is contained in:
@@ -329,4 +329,15 @@ or echo strings not converted to uppercase
|
||||
string upper -q ABC DEF
|
||||
and echo uppercasing a uppercase string did not fail as expected
|
||||
|
||||
logmsg 'Check NUL'
|
||||
# Note: We do `string escape` at the end to make a `\0` literal visible.
|
||||
printf 'a\0b' | string escape
|
||||
printf 'a\0c' | string match -e 'a' | string escape
|
||||
printf 'a\0d' | string split '' | string escape
|
||||
printf 'a\0b' | string match -r '.*b$' | string escape
|
||||
printf 'a\0b' | string replace b g | string escape
|
||||
printf 'a\0b' | string replace -r b g | string escape
|
||||
# TODO: These do not yet work!
|
||||
# printf 'a\0b' | string match '*b' | string escape
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user