projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
61cf146
)
Removed double quotes around case arguments in test scripts.
author
David Levine
<levinedl@acm.org>
Sun, 23 Sep 2012 14:02:18 +0000
(09:02 -0500)
committer
David Levine
<levinedl@acm.org>
Sun, 23 Sep 2012 14:02:18 +0000
(09:02 -0500)
test/README
patch
|
blob
|
history
test/post/test-messageid
patch
|
blob
|
history
test/whatnow/test-attach-detach
patch
|
blob
|
history
test/whatnow/test-cd
patch
|
blob
|
history
test/whatnow/test-ls
patch
|
blob
|
history
diff --git
a/test/README
b/test/README
index
7b1de5f
..
1932cd7
100644
(file)
--- a/
test/README
+++ b/
test/README
@@
-78,3
+78,7
@@
assignment in export statements.
checkbashisms, available at http://sourceforge.net/projects/checkbaskisms/,
might help some catch problems. Though it misses all of the troublesome
constructs, except for assignment in an export statement, listed above.
checkbashisms, available at http://sourceforge.net/projects/checkbaskisms/,
might help some catch problems. Though it misses all of the troublesome
constructs, except for assignment in an export statement, listed above.
+
+The "Portable Shell" section of the Autoconf info manual has a wealth
+of tips for avoiding portability problems in shell scripts. It might
+be available by entering: info autoconf portable.
diff --git
a/test/post/test-messageid
b/test/post/test-messageid
index
1dc4f0c
..
45f75d0
100755
(executable)
--- a/
test/post/test-messageid
+++ b/
test/post/test-messageid
@@
-68,7
+68,7
@@
test_messageid ()
cur=`mhpath cur`
# Verify that Message-ID is of the right form. We'll see how
# portable these grep regular expressions are.
cur=`mhpath cur`
# Verify that Message-ID is of the right form. We'll see how
# portable these grep regular expressions are.
- case "$msgid_style" in
+ case $msgid_style in
localname)
# e.g., Message-ID: <5348.1342884222@localhost.localdomain>
id='^Message-ID: <[0-9]\{1,\}\.[0-9]\{1,\}@'
localname)
# e.g., Message-ID: <5348.1342884222@localhost.localdomain>
id='^Message-ID: <[0-9]\{1,\}\.[0-9]\{1,\}@'
diff --git
a/test/whatnow/test-attach-detach
b/test/whatnow/test-attach-detach
index
7d538a2
..
9f308aa
100755
(executable)
--- a/
test/whatnow/test-attach-detach
+++ b/
test/whatnow/test-attach-detach
@@
-41,7
+41,7
@@
set +e
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
-case "${whatnowtest}" in
+case ${whatnowtest} in
cd) cat > "$expected" <<EOF
attach $testname_quoted
alist
cd) cat > "$expected" <<EOF
attach $testname_quoted
alist
diff --git
a/test/whatnow/test-cd
b/test/whatnow/test-cd
index
9cc3286
..
ef6175d
100755
(executable)
--- a/
test/whatnow/test-cd
+++ b/
test/whatnow/test-cd
@@
-35,7
+35,7
@@
set +e
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
-case "${whatnowtest}" in
+case ${whatnowtest} in
cd) cat > "$expected" <<EOF
cd ${MH_TEST_DIR}/foo\'s\ bar
pwd
cd) cat > "$expected" <<EOF
cd ${MH_TEST_DIR}/foo\'s\ bar
pwd
diff --git
a/test/whatnow/test-ls
b/test/whatnow/test-ls
index
31afee2
..
b70f593
100755
(executable)
--- a/
test/whatnow/test-ls
+++ b/
test/whatnow/test-ls
@@
-36,7
+36,7
@@
set +e
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
whatnowtest=`echo cd | TERM=dumb whatnow -prompt ''`
set -e
-case "${whatnowtest}" in
+case ${whatnowtest} in
cd) cat > "$expected" <<EOF
baz
boz
cd) cat > "$expected" <<EOF
baz
boz