comparison runtime/syntax/testdir/input/sh_04.sh @ 32631:f8a2fc7d823f v9.0.1647

patch 9.0.1647: insufficient testing for syntax plugins Commit: https://github.com/vim/vim/commit/1aa5f1c21fea60fe64cdcdf6990bf43ea5cc78a0 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 22 21:57:51 2023 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 22 Jun 2023 23:00:05 +0200
parents
children ae505eaf2794
comparison
equal deleted inserted replaced
32630:7477909c676f 32631:f8a2fc7d823f
1 #!/bin/sh
2 # sh4
3 Variable=${VariableB:-{VariableC}}
4 Variable=${VariableB:-${VariableC:-{Var3:=eng}}}
5
6 # This gets marked as an error while its ok
7 Variable=${VariableB:-${VariableC:-{Var3:=eng}}}
8 Variable=${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}
9 Variable=${VariableB:=${VariableC:={Var3:=${Var4:-${Var5:-eng}}}}}
10 Variable=${VariableB:=${VariableC:={Var3:=${Var4:-${Var5:-$Var6}}}}}
11
12 # These are OK
13 Variable="${VariableB:-${VariableC:-{Var3:=eng}}}"
14 Variable="${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}"
15
16 # This gets marked as an error too
17 : ${VariableB:-${VariableC:-{Var3:=eng}}}
18 : ${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}}
19
20 # This is OK
21 : ${VariableB:-${VariableC:-eng}}
22 : "${VariableB:-${VariableC:-eng}}"
23
24 # First line is OK except its missing a closing "}",
25 # so second line should have some error highlighting
26 Variable=${VariableB:=${VariableC:={Var3:=${Var4:-eng}}}
27 Variable=${VariableB:-${VariableC:-{Var3:=eng}}