]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/comsub-posix.right
Bash-5.2-rc4 release
[thirdparty/bash.git] / tests / comsub-posix.right
CommitLineData
3185942a
JA
1abmnopyz
2abmnopyz
3ab
4
5
8868edaf 6abcd
3185942a 7abcd
4491c030
CR
8mnop
9qrst
3185942a
JA
10sh_352.26ax
11sh_352.26ay
12sh_352.25a sh_352.25b
13sh_352.27 ) ) )
14abc
4491c030 15def
3185942a
JA
16here doc with )
17)
18bad' syntax
19a
20sh_352.26a
21sh_352.26a
22sh_352.26
23sh_352.26
24sh_352.26
251
26sh_352.28 )
27sh_352.28 )
28k
29abcd
30ab
31ab
32abcde
33
34argv[1] = <abcde^J >
35abcdefoo
36argv[1] = <abcde>
37argv[2] = <foo>
38argv[1] = <wxabcdeyz>
39argv[1] = <abcde>
40'
41after 1
42'
43after 2
44'
45after 3
46`
47after 4
48hello
49after 5
50'
51after 6
52x
53x
8868edaf 54x
3185942a
JA
55quoted )
56comment
57here-doc with )
8868edaf 58here-doc with \()
3185942a
JA
59here-doc terminated with a parenthesis
60' # or a single back- or doublequote
8868edaf 61line terminated with a backslash
4491c030
CR
62./comsub-posix1.sub: line 1: syntax error near unexpected token `)'
63./comsub-posix1.sub: line 1: `echo $( if x; then echo foo )'
495aee44
CR
64swap32_posix is a function
65swap32_posix ()
66{
67 local funcname=swap32_posix;
68 local arg;
69 for arg in "$@";
70 do
71 echo $((
72 ($arg & 4278190080) >> 24 |
73 ($arg & 16711680) >> 8 |
74 ($arg & 65280) << 8 |
75 ($arg & 255) << 24
76 ));
77 done
78}
6c1407d2
CR
79bash: -c: line 1: syntax error near unexpected token `done'
80bash: -c: line 1: `: $(case x in x) ;; x) done esac)'
81bash: -c: line 1: syntax error near unexpected token `done'
82bash: -c: line 1: `: $(case x in x) ;; x) done ;; esac)'
83bash: -c: line 1: syntax error near unexpected token `esac'
84bash: -c: line 1: `: $(case x in x) (esac) esac)'
4491c030
CR
85bash: -c: line 1: syntax error near unexpected token `in'
86bash: -c: line 1: `: $(case x in esac|in) foo;; esac)'
87bash: -c: line 1: syntax error near unexpected token `done'
88bash: -c: line 1: `: $(case x in x) ;; x) done)'
6c1407d2
CR
89case: -c: line 3: syntax error near unexpected token `esac'
90case: -c: line 3: `$( esac ; bar=foo ; echo "$bar")) echo bad 2;;'
91ok 2
92inside outside
93ok 3
94syntax-error: -c: line 2: syntax error near unexpected token `done'
95syntax-error: -c: line 2: `: $(case x in x) ;; x) done ;; esac)'
495aee44 96yes
4491c030
CR
97
98
99
a0c0a00f 100ab cde