Skip to content

Commit 864454f

Browse files
authored
Merge pull request #3 from bbannier/topic/bbannier/misc_cleanups
Miscellaneous cleanups
2 parents e3eafce + 88248fa commit 864454f

File tree

40 files changed

+953
-103
lines changed

40 files changed

+953
-103
lines changed

LICENSE renamed to COPYING

File renamed without changes.

README.md renamed to README

File renamed without changes.

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.0

example.zeek

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@load ./scripts
1+
@load ztest
22

33
ZTest::suppress_success_output();
44

scripts/__load__.zeek

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@load ./ztest
1+
@load ./ztest

scripts/ztest.zeek

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@load base/misc/version
2+
@load base/utils/backtrace
3+
14
## ZTest is a basic unit testing framework for Zeek scripts
25
## It is largely based on Ruby's MiniTest framework (https://github.com/seattlerb/minitest)
36
## The expected use case is to combine this with BTest to create rich unit tests that provide detailed output and make it easier to understand what failed
@@ -323,4 +326,4 @@ event zeek_done() &priority=1000000 {
323326
function test_exit() {
324327
print_success("Exiting with test exit code");
325328
exit(has_any_test_failed ? 1 : 0);
326-
}
329+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
2+
3+
Running Test Suite: Suite 1
4+
------------------------------------
5+
Running Test: Example Test
6+
7+
Total Assertions: 1
8+
1 successful assertions
9+
0 failed assertions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
2+
3+
Assert Failed: 1 didn't equal 2 (Suite 1/Example Test)
4+
Expected: 1
5+
Actual: 2
6+
Backtrace:
7+
#0: print_backtrace(show_args: bool = T, one_line: bool = F, one_line_delim: string = |, skip: count = 1, to_file: file of string = file "<...>/stdout" of string) at <...>/ztest.zeek:92
8+
#1: ZTest::print_failure_backtrace() at <...>/ztest.zeek:142
9+
#2: ZTest::mark_result(succeeded: bool = F, expected_string: string = 1, actual_string: string = 2, message: string = 1 didn't equal 2) at <...>/ztest.zeek:165
10+
#3: ZTest::assert_equal(expected: any = 1, actual: any = 2, message: string = 1 didn't equal 2) at <...>/01_success_suppressed_with_failures.zeek:11
11+
#4: lambda_<11306566079413392943>() at <...>/ztest.zeek:286
12+
#5: ZTest::run_tests() at <...>/01_success_suppressed_with_failures.zeek:14
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.

0 commit comments

Comments
 (0)