5 |
|
|
6 |
# AUDIT: |
# AUDIT: |
7 |
|
|
8 |
. testing.sh |
. ./testing.sh |
9 |
|
|
10 |
# testing "test name" "options" "expected result" "file input" "stdin" |
# testing "test name" "options" "expected result" "file input" "stdin" |
11 |
# file input will be file called "input" |
# file input will be file called "input" |
85 |
testing "egrep is not case insensitive" \ |
testing "egrep is not case insensitive" \ |
86 |
"egrep foo ; [ \$? -ne 0 ] && echo yes" "yes\n" "" "FOO\n" |
"egrep foo ; [ \$? -ne 0 ] && echo yes" "yes\n" "" "FOO\n" |
87 |
|
|
88 |
|
testing "grep -E -o prints all matches" \ |
89 |
|
"grep -E -o '([[:xdigit:]]{2}[:-]){5}[[:xdigit:]]{2}'" \ |
90 |
|
"00:19:3E:00:AA:5E\n00:1D:60:3D:3A:FB\n00:22:43:49:FB:AA\n" \ |
91 |
|
"" "00:19:3E:00:AA:5E 00:1D:60:3D:3A:FB 00:22:43:49:FB:AA\n" |
92 |
|
|
93 |
|
testing "grep -o does not loop forever" \ |
94 |
|
'grep -o "[^/]*$"' \ |
95 |
|
"test\n" \ |
96 |
|
"" "/var/test\n" |
97 |
|
|
98 |
exit $FAILCOUNT |
exit $FAILCOUNT |