mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
8d88b4d358
Also, if there are more single quotes than double quotes and dollars, use double quotes for quoting.
12 lines
287 B
Fish
12 lines
287 B
Fish
#RUN: %fish %s
|
|
# NUL-handling
|
|
|
|
# This one actually prints a NUL
|
|
echo (printf '%s\x00' foo bar | string escape)
|
|
# CHECK: foo\x00bar\x00
|
|
# This one is truncated
|
|
echo foo\x00bar | string escape
|
|
# CHECK: foo
|
|
# This one is just escaped
|
|
echo foo\\x00bar | string escape
|
|
# CHECK: 'foo\\x00bar'
|