summary refs log tree commit diff
path: root/bin/cash/tests/expansion/plus-minus5.0
blob: c3b97570a9703f9c0f00017561aa8f1177f33455 (plain) (blame)
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
# $FreeBSD: releng/12.0/bin/sh/tests/expansion/plus-minus5.0 214492 2010-10-28 22:34:49Z jilles $

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 -- ${e:-"{x}"}'			'1|{x}'
testcase 'set -- "${e:-"{x}"}"'			'1|{x}'
testcase 'set -- ${h+"{x}"}'			'1|{x}'
testcase 'set -- "${h+"{x}"}"'			'1|{x}'
testcase 'set -- ${h:-"{x}"}'			'1|##'
testcase 'set -- "${h:-"{x}"}"'			'1|##'

test "x$failures" = x
src/commit/pdf/Makefile?id=83e9fc9165e1aa1ae7c844fcfe5005adcd5a9e73&follow=1'>Move pdf script to MakefileJune McEnroe 2019-07-27Update macOS neovim to 0.3.8June McEnroe Which somehow still doesn't include my man fix. 2019-07-27Rewrite port makefiles consistentlyJune McEnroe 2019-07-27Rewrite Makefile once more with more organizationJune McEnroe 2019-07-27Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe This reverts commit 4b7d5161a30645b0a23691687ef1aafdda62d3bb. I don't know why but I don't like it. 2019-07-27Remove scheme text linkJune McEnroe No standard base64 encoder so no way to maintain it. 2019-07-26Update Dark.terminalJune McEnroe Why are the blobs so much bigger now? 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe When? Now. 2019-07-24Remove histedit from bitJune McEnroe