diff options
author | Guy Harris <gharris@sonic.net> | 2020-06-14 17:49:44 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-06-14 17:49:44 -0700 |
commit | 8be0a90ea527d872150dd4c202abf57150f7ee2a (patch) | |
tree | 1c9a7bc82d6a0206db2f59f43ab802b19c607d50 /tests | |
parent | ed1d87853ba9e1dd0889089488c40eb8701431ae (diff) | |
download | tcpdump-8be0a90ea527d872150dd4c202abf57150f7ee2a.tar.gz |
TESTrun: add definitions of true and false.
If we don't give them definitions, in some contents they are interpreted
as strings, and 'false', being a non-empty string, is interpreted as
being true. See, for example:
https://stackoverflow.com/questions/6936194/is-there-a-built-in-true-false-boolean-value-in-perl
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/TESTrun | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/TESTrun b/tests/TESTrun index cb46a505..842a2dfd 100755 --- a/tests/TESTrun +++ b/tests/TESTrun @@ -18,6 +18,11 @@ if (!($TCPDUMP = $ENV{TCPDUMP_BIN})) { } } +# +# Make true and false work as Booleans. +# +use constant { true => 1, false => 0 }; + use File::Basename; use POSIX qw( WEXITSTATUS WIFEXITED); use Cwd qw(abs_path getcwd); |