Groups
Sign in
Groups
shunit2-users
Conversations
About
Send feedback
Help
BUG: asserEquals failes in bash when "nullglob" is set
53 views
Skip to first unread message
nomike
unread,
Mar 22, 2012, 3:48:38 PM
3/22/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to shunit2-users
Hi!
I found a bug in shunit2.
If you enable nullglob („shopt –s nullglob“) assertEquals crashes.
Example code:
----SNIP----
#!/bin/bash
test_1() {
assertEquals "This test works" "0" "0"
}
test_2() {
shopt -s nullglob
assertEquals "This test crashes" "0" "0"
}
. /projekte/install/lib/src/shunit2
----SNAP----
Output:
----SNIP----
test_1
test_2
/projekte/install/lib/src/shunit2: eval: line 105: unexpected EOF
while looking for matching `"'
/projekte/install/lib/src/shunit2: eval: line 106: syntax error:
unexpected end of file
Ran 2 tests.
OK
----SNAP----
cheers
nomike
Reply all
Reply to author
Forward
0 new messages