fish-shell/tests/checks/nuls.fish
Johannes Altmanninger 1e858eae35 tests: filter control sequences only when interactive
This demonstrates that we only write control sequences when interactive.
2024-04-12 12:28:22 +02:00

13 lines
285 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