patch 9.0.1647: insufficient testing for syntax plugins
Problem: Insufficient testing for syntax plugins.
Solution: Add shell file examples. (Charles Campbell) Create a messages
file for easier debugging and reporting the test results.
This commit is contained in:
27
runtime/syntax/testdir/input/sh_04.sh
Normal file
27
runtime/syntax/testdir/input/sh_04.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# sh4
|
||||
Variable=${VariableB:-{VariableC}}
|
||||
Variable=${VariableB:-${VariableC:-{Var3:=eng}}}
|
||||
|
||||
# This gets marked as an error while its ok
|
||||
Variable=${VariableB:-${VariableC:-{Var3:=eng}}}
|
||||
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}
|
||||
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-${Var5:-eng}}}}}
|
||||
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-${Var5:-$Var6}}}}}
|
||||
|
||||
# These are OK
|
||||
Variable="${VariableB:-${VariableC:-{Var3:=eng}}}"
|
||||
Variable="${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}"
|
||||
|
||||
# This gets marked as an error too
|
||||
: ${VariableB:-${VariableC:-{Var3:=eng}}}
|
||||
: ${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}
|
||||
|
||||
# This is OK
|
||||
: ${VariableB:-${VariableC:-eng}}
|
||||
: "${VariableB:-${VariableC:-eng}}"
|
||||
|
||||
# First line is OK except its missing a closing "}",
|
||||
# so second line should have some error highlighting
|
||||
Variable=${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}
|
||||
Variable=${VariableB:-${VariableC:-{Var3:=eng}}
|
||||
Reference in New Issue
Block a user