chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0150d8
)
sym-gtest: Don't include empty words.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 27 Dec 2008 14:26:02 +0000
(14:26 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 27 Dec 2008 14:28:36 +0000
(14:28 +0000)
An empty word in a command like `set LABEL' provokes a segfault from
sym-test -- not entirely unreasonably considering that sym-test is a
quick lash-up and not intended to be robust against bogus test scripts.
So filter them out in advance.
sym-gtest
patch
|
blob
|
blame
|
history
diff --git
a/sym-gtest
b/sym-gtest
index 3dd6ed6e731746494caa632bc6a54310e773ef61..ac5bcafcfddd2c1cf70f5c4d388e91b0abcc6366 100755
(executable)
--- a/
sym-gtest
+++ b/
sym-gtest
@@
-18,7
+18,7
@@
sub random ($) {
$words = "/usr/dict/words";
-r $words or $words = "/usr/share/dict/words";
open(DICT, $words) or die("open($words): $!");
-@w = <DICT>;
+@w =
grep /./,
<DICT>;
chomp(@w);
close(DICT);