# Known differences from dash, used by t/dash.t: FILE<TAB>REASON<TAB>STRING (as in the battery file).
# A difference not listed here fails the test; a listed one that agrees is only reported. FLAKY: may agree or not.
battery.txt parser: empty quotes in a word (known since 2026-11-01, battery 42/43) y=; echo [$y] ["$y"] ['']
largebattery.txt rejected by the parser: comma operator in arithmetic echo $(( y = 2, 3 ))
largebattery.txt $0 is sh here, not dash echo $0 $# "[$*]"
largebattery.txt rejected by the parser: settings before export x=1 export y=2; echo $x $y; sh -c 'echo $y'
pspawn-d2.txt rejected on purpose: a lone input redirection (bash reads the file in $(<file)) < /nonexist/f; echo $?
pspawn-l10.txt message prefix inside captured text (dash: 'dash: 1: ', ours: 'sh: ') x=$( (head -c 10000000 /dev/zero | tr '\0' a & nosuchcmd; wait) 2>&1); echo ${#x}
pspawn-l10.txt message prefix inside captured text x=$( (head -c 3000000 /dev/zero | tr '\0' a & echo ${zz?gone}; wait) 2>&1 | tr -d a); echo "$x"
pspawn-l10.txt printf is a program here, so a 10 MB argument is too long (E2BIG) x=$(head -c 10000000 /dev/zero | tr '\0' a & umask; wait); echo ${#x} $(printf %s "$x" | tr -d a)
t1.txt X2: $! of a background job that started no process : & echo "[$!]" | tr 0-9 N
t1.txt rejected by the parser: ** is not POSIX arithmetic echo $(( 2 ** 3 ))
t1.txt arithmetic overflow: dash and Perl differ echo $((-9223372036854775807-1)) $(( (-9223372036854775807-1) / -1 ))
t1.txt X5: arithmetic error message worded differently echo $((08))
t1.txt X5: arithmetic error message worded differently echo $((1-$x))
t1.txt parser: [${x}x] field splitting at a brace (known) x=' a '; echo "[$x]" [$x] [${x}x]
t2.txt rejected by the parser: here-strings are bash while read l; do echo "<$l>"; cat; done <<<x
t2.txt FLAKY: order of stderr lines from parallel pipeline elements (varies in dash too) { read a <&5; echo "A=$a" | cut -c1-6 >&2; } 5</etc/passwd | { read b <&5; echo "B=$b"| cut -c1-6 >&2; } 5</etc/hostname; echo done
t3.txt rejected by the parser since U2: a pattern that may match . or .. echo .* | wc -w
large-subset-b13.txt alias lists in sorted order (as bash); dash in the order of its hash table (subtle) alias a=b c="d e"; alias; echo st=$?
large-subset-e.txt rule E (info): jobs are listed in a pipeline, as bash sleep 1 & jobs | wc -l
large-subset-e.txt rule E (info): jobs are listed in $( ), as bash sleep 1 & x=$(jobs -p); [ "$x" = "$!" ] && echo same
large-subset-e.txt rule E (error): return outside a function is an error, as bash echo a; return; echo b
large-subset-e.txt rule E (error): cd with extra operands is an error, as bash mkdir a b; cd a b; echo "st=$?"
large-subset-e.txt rule E (same): a descriptor of two digits is redirected, as bash echo hi 10>/dev/null
large-subset-e.txt rule E (harm): a pattern never matches . or .., as bash mkdir -p .h; echo .*
large-subset-e.txt rule E (platform): [^a] negates, as bash and fnmatch(3) case b in [^a]) echo neg;; *) echo lit;; esac
large-subset-e.txt rule E (error): cd without HOME is an error, as bash n=HOME; unset $n; cd; echo st=$?
largebattery.txt rule E (posix): OPTARG is unset when no option, or an option without an argument, was found (POSIX getopts; as bash) while getopts ab:c o -ac -b x -c y; do echo "$o ${OPTARG-u} $OPTIND"; done; echo "end $OPTIND"
largebattery.txt rule E (posix): OPTARG is unset when no option, or an option without an argument, was found (POSIX getopts; as bash) getopts ab: o -b v; getopts ab: o -b v; echo "[$o] [$OPTARG] $OPTIND"
largebattery.txt rule E (posix): OPTARG is unset when no option, or an option without an argument, was found (POSIX getopts; as bash) getopts :a o -x; echo "[$o] [$OPTARG]"; getopts a o -x; echo "[$o] [${OPTARG-unset}]"
large-subset-post04.txt rule E (same): ${@#p} and ${*%p} work on each parameter, as bash (G4) set -- ab ac bc; echo ${@#a}; for x in "${@#a}"; do echo "[$x]"; done; echo "${*%c}"
large-subset-post04.txt rule E (info): $LINENO is the line number, as bash (G8) echo $LINENO@Necho $LINENO; f() {@Necho $LINENO@N}@Nf; echo $((LINENO + 10)) ${LINENO}
large-subset-post04.txt rule E (info): ~ without HOME is the home in the password file, as bash (G16) unset HOME; echo ~ ~/x; HOME=/usr; echo ~; cd; pwd