mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Add checks for incomplete escape sequences
Also codify in tests the current, case-sensitive behavior of \C vs \c
This commit is contained in:
parent
351500e42d
commit
d2f6c925e1
1 changed files with 18 additions and 0 deletions
|
@ -569,6 +569,24 @@ $fish -c 'echo \utest'
|
|||
# CHECKERR: echo \utest
|
||||
# CHECKERR: ^~~~~^
|
||||
|
||||
$fish -c 'echo \c'
|
||||
# CHECKERR: fish: Incomplete escape sequence '\c'
|
||||
# CHECKERR: echo \c
|
||||
# CHECKERR: ^^
|
||||
|
||||
$fish -c 'echo \C'
|
||||
# CHECK: C
|
||||
|
||||
$fish -c 'echo \U'
|
||||
# CHECKERR: fish: Incomplete escape sequence '\U'
|
||||
# CHECKERR: echo \U
|
||||
# CHECKERR: ^^
|
||||
|
||||
$fish -c 'echo \x'
|
||||
# CHECKERR: fish: Incomplete escape sequence '\x'
|
||||
# CHECKERR: echo \x
|
||||
# CHECKERR: ^^
|
||||
|
||||
printf '%s\n' "#!/bin/sh" 'echo $0' > $tmpdir/argv0.sh
|
||||
chmod +x $tmpdir/argv0.sh
|
||||
cd $tmpdir
|
||||
|
|
Loading…
Reference in a new issue