File: errors12.sub

package info (click to toggle)
bash 5.3-2
  • links: PTS
  • area: main
  • in suites: sid
  • size: 44,432 kB
  • sloc: ansic: 134,747; sh: 8,866; yacc: 5,966; makefile: 4,697; perl: 4,105; asm: 48; awk: 23; sed: 16
file content (42 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
: ${THIS_SH:=./bash}

# various error messages about incomplete compound commands

${THIS_SH} -c 'if
	true; true
then
	echo foo bar' bash

${THIS_SH} -c 'while false; do
	echo true' bash

${THIS_SH} -c 'until false
do
	echo false
' bash

${THIS_SH} -c 'for f
in 1 2 3
do
	: ; :' bash

${THIS_SH} -c 'case foo in
bar)	if false
	then
		true
	fi
	;;
' bash

# this tripped up ubsan
x()
{
    case y in         
        z)    
            if (! false); then
              foo=bar
            fi
            ;;
    esac
}