003 File Manager
Current Path:
/usr/src/bin/sh/tests/expansion
usr
/
src
/
bin
/
sh
/
tests
/
expansion
/
📁
..
📄
Makefile
(2.97 KB)
📄
Makefile.depend
(176 B)
📄
arith1.0
(431 B)
📄
arith10.0
(595 B)
📄
arith11.0
(379 B)
📄
arith12.0
(63 B)
📄
arith13.0
(269 B)
📄
arith14.0
(756 B)
📄
arith15.0
(392 B)
📄
arith16.0
(496 B)
📄
arith17.0
(48 B)
📄
arith2.0
(1.31 KB)
📄
arith3.0
(191 B)
📄
arith4.0
(372 B)
📄
arith5.0
(299 B)
📄
arith6.0
(393 B)
📄
arith7.0
(114 B)
📄
arith8.0
(82 B)
📄
arith9.0
(345 B)
📄
assign1.0
(1017 B)
📄
cmdsubst1.0
(1.03 KB)
📄
cmdsubst10.0
(869 B)
📄
cmdsubst11.0
(106 B)
📄
cmdsubst12.0
(73 B)
📄
cmdsubst13.0
(235 B)
📄
cmdsubst14.0
(27 B)
📄
cmdsubst15.0
(28 B)
📄
cmdsubst16.0
(51 B)
📄
cmdsubst17.0
(54 B)
📄
cmdsubst18.0
(109 B)
📄
cmdsubst19.0
(118 B)
📄
cmdsubst2.0
(1.26 KB)
📄
cmdsubst20.0
(113 B)
📄
cmdsubst21.0
(116 B)
📄
cmdsubst22.0
(110 B)
📄
cmdsubst23.0
(91 B)
📄
cmdsubst24.0
(653 B)
📄
cmdsubst25.0
(64 B)
📄
cmdsubst26.0
(56 B)
📄
cmdsubst3.0
(440 B)
📄
cmdsubst4.0
(63 B)
📄
cmdsubst5.0
(53 B)
📄
cmdsubst6.0
(890 B)
📄
cmdsubst7.0
(443 B)
📄
cmdsubst8.0
(255 B)
📄
cmdsubst9.0
(96 B)
📄
export1.0
(209 B)
📄
export2.0
(282 B)
📄
export3.0
(408 B)
📄
heredoc1.0
(349 B)
📄
heredoc2.0
(200 B)
📄
ifs1.0
(539 B)
📄
ifs2.0
(577 B)
📄
ifs3.0
(437 B)
📄
ifs4.0
(681 B)
📄
ifs5.0
(49 B)
📄
ifs6.0
(67 B)
📄
ifs7.0
(64 B)
📄
length1.0
(312 B)
📄
length2.0
(62 B)
📄
length3.0
(271 B)
📄
length4.0
(324 B)
📄
length5.0
(537 B)
📄
length6.0
(155 B)
📄
length7.0
(246 B)
📄
length8.0
(250 B)
📄
local1.0
(321 B)
📄
local2.0
(450 B)
📄
pathname1.0
(1.79 KB)
📄
pathname2.0
(891 B)
📄
pathname3.0
(543 B)
📄
pathname4.0
(415 B)
📄
pathname5.0
(40 B)
📄
pathname6.0
(433 B)
📄
plus-minus1.0
(2.31 KB)
📄
plus-minus2.0
(38 B)
📄
plus-minus3.0
(1.28 KB)
📄
plus-minus4.0
(962 B)
📄
plus-minus5.0
(623 B)
📄
plus-minus6.0
(743 B)
📄
plus-minus7.0
(384 B)
📄
plus-minus8.0
(136 B)
📄
plus-minus9.0
(48 B)
📄
question1.0
(832 B)
📄
question2.0
(176 B)
📄
readonly1.0
(128 B)
📄
redir1.0
(481 B)
📄
set-u1.0
(1.26 KB)
📄
set-u2.0
(133 B)
📄
set-u3.0
(96 B)
📄
tilde1.0
(903 B)
📄
tilde2.0
(1.71 KB)
📄
trim1.0
(2.49 KB)
📄
trim10.0
(42 B)
📄
trim11.0
(44 B)
📄
trim2.0
(1.48 KB)
📄
trim3.0
(1.1 KB)
📄
trim4.0
(463 B)
📄
trim5.0
(508 B)
📄
trim6.0
(520 B)
📄
trim7.0
(551 B)
📄
trim8.0
(2.15 KB)
📄
trim9.0
(2 KB)
Editing: plus-minus1.0
# $FreeBSD$ e= q='?' a='*' t=texttext s='ast*que?non' p='/et[c]/' w='a b c' b='{{(#)}}' h='##' failures='' ok='' testcase() { code="$1" expected="$2" oIFS="$IFS" eval "$code" IFS='|' result="$#|$*" IFS="$oIFS" if [ "x$result" = "x$expected" ]; then ok=x$ok else failures=x$failures echo "For $code, expected $expected actual $result" fi } testcase 'set -- a b' '2|a|b' testcase 'set --' '0|' testcase 'set -- ${e}' '0|' testcase 'set -- "${e}"' '1|' testcase 'set -- $p' '1|/etc/' testcase 'set -- "$p"' '1|/et[c]/' testcase 'set -- ${s+$p}' '1|/etc/' testcase 'set -- "${s+$p}"' '1|/et[c]/' testcase 'set -- ${s+"$p"}' '1|/et[c]/' # Dquotes in dquotes is undefined for Bourne shell operators #testcase 'set -- "${s+"$p"}"' '1|/et[c]/' testcase 'set -- ${e:-$p}' '1|/etc/' testcase 'set -- "${e:-$p}"' '1|/et[c]/' testcase 'set -- ${e:-"$p"}' '1|/et[c]/' # Dquotes in dquotes is undefined for Bourne shell operators #testcase 'set -- "${e:-"$p"}"' '1|/et[c]/' testcase 'set -- ${e:+"$e"}' '0|' testcase 'set -- ${e:+$w"$e"}' '0|' testcase 'set -- ${w:+"$w"}' '1|a b c' testcase 'set -- ${w:+$w"$w"}' '3|a|b|ca b c' testcase 'set -- "${s+a b}"' '1|a b' testcase 'set -- "${e:-a b}"' '1|a b' testcase 'set -- ${e:-\}}' '1|}' testcase 'set -- ${e:+{}}' '1|}' testcase 'set -- "${e:+{}}"' '1|}' testcase 'set -- ${e+x}${e+x}' '1|xx' testcase 'set -- "${e+x}"${e+x}' '1|xx' testcase 'set -- ${e+x}"${e+x}"' '1|xx' testcase 'set -- "${e+x}${e+x}"' '1|xx' testcase 'set -- "${e+x}""${e+x}"' '1|xx' testcase 'set -- ${e:-${e:-$p}}' '1|/etc/' testcase 'set -- "${e:-${e:-$p}}"' '1|/et[c]/' testcase 'set -- ${e:-"${e:-$p}"}' '1|/et[c]/' testcase 'set -- ${e:-${e:-"$p"}}' '1|/et[c]/' testcase 'set -- ${e:-${e:-${e:-$w}}}' '3|a|b|c' testcase 'set -- ${e:-${e:-${e:-"$w"}}}' '1|a b c' testcase 'set -- ${e:-${e:-"${e:-$w}"}}' '1|a b c' testcase 'set -- ${e:-"${e:-${e:-$w}}"}' '1|a b c' testcase 'set -- "${e:-${e:-${e:-$w}}}"' '1|a b c' testcase 'shift $#; set -- ${1+"$@"}' '0|' testcase 'set -- ""; set -- ${1+"$@"}' '1|' testcase 'set -- "" a; set -- ${1+"$@"}' '2||a' testcase 'set -- a ""; set -- ${1+"$@"}' '2|a|' testcase 'set -- a b; set -- ${1+"$@"}' '2|a|b' testcase 'set -- a\ b; set -- ${1+"$@"}' '1|a b' testcase 'set -- " " ""; set -- ${1+"$@"}' '2| |' test "x$failures" = x
Upload File
Create Folder