mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Test expansion syntax errors.
If there is a better way to do stuff that will stop execution than fish -c for our tests, please let me know.
This commit is contained in:
parent
1834e962d2
commit
014ab7935e
3 changed files with 23 additions and 0 deletions
|
@ -25,3 +25,17 @@ echo $$paren
|
|||
|
||||
####################
|
||||
# Test path variables
|
||||
|
||||
####################
|
||||
# Test fatal syntax errors
|
||||
fish: $, is not a valid variable in fish.
|
||||
echo $,foo
|
||||
^
|
||||
fish: Unexpected end of string, incomplete parameter expansion
|
||||
echo {
|
||||
^
|
||||
|
||||
fish: Unexpected '}' for unopened brace expansion
|
||||
echo {}}
|
||||
^
|
||||
|
||||
|
|
|
@ -148,3 +148,9 @@ set testvar "$testvar:FOUR"
|
|||
echo "Appended path: $testvar" (count $testvar)
|
||||
set --unpath testvar $testvar
|
||||
echo "Back to normal variable: $testvar" (count $testvar)
|
||||
|
||||
logmsg Test fatal syntax errors
|
||||
../test/root/bin/fish -c 'echo $,foo'
|
||||
../test/root/bin/fish -c 'echo {'
|
||||
../test/root/bin/fish -c 'echo {}}'
|
||||
true
|
|
@ -87,3 +87,6 @@ Not a path: ONE:TWO:THREE 1
|
|||
As a path: ONE:TWO:THREE 3
|
||||
Appended path: ONE:TWO:THREE:FOUR 4
|
||||
Back to normal variable: ONE TWO THREE FOUR 4
|
||||
|
||||
####################
|
||||
# Test fatal syntax errors
|
||||
|
|
Loading…
Reference in a new issue