zeek/testing/btest/bifs/piped_exec.bro
Jon Siwek 95ffb1cf27 Quick pass over unit tests, adding -b flag to bro so they run faster.
Doing this made bifs/ ~3x faster and language/ ~2x faster.
2012-11-30 17:44:36 -06:00

14 lines
336 B
Text

# @TEST-EXEC: bro -b %INPUT >output
# @TEST-EXEC: btest-diff output
# @TEST-EXEC: btest-diff test.txt
global cmds = "print \"hello world\";";
cmds = string_cat(cmds, "\nprint \"foobar\";");
if ( piped_exec("bro", cmds) != T )
exit(1);
# Test null output.
if ( piped_exec("cat > test.txt", "\x00\x00hello\x00\x00") != T )
exit(1);