Unit testing with tcltest
Thanks to a very helpful online blog tutorial, I was able to get going with some real unit testing for my juniper-helpers library on github. This is going to be very handy to have.
fluong@ubuntu:~/juniper-helpers/test$ ./all.tcl
Tests running in interp: /usr/bin/tclsh8.5
Tests located in: /home/fluong/Dropbox/code/juniper-helpers/test
Tests running in: /home/fluong/Dropbox/code/juniper-helpers/test
Temporary files stored in /home/fluong/Dropbox/code/juniper-helpers/test
Test files run in separate interpreters
Running tests that match: *
Skipping test files that match: l.*.test
Only running test files that match: *.test
Tests began at Sun Mar 09 21:22:38 EDT 2014
gen.tcl.test
++++ range_1_1 PASSED
++++ range_1_2 PASSED
++++ range_1_10 PASSED
++++ range_2_10_2 PASSED
++++ ipv4_count_0 PASSED
++++ ipv4_count_1 PASSED
++++ test_ipv4_1024_incr_third_octet PASSED
textproc.tcl.test
++++ nsplit_single_line PASSED
++++ nsplit_basic_1 PASSED
++++ njoin_single_item PASSED
++++ njoin_basic_1 PASSED
++++ nrange_0_0 PASSED
++++ nrange_0_1 PASSED
++++ nrange_end PASSED
Tests ended at Sun Mar 09 21:22:38 EDT 2014
all.tcl: Total 14 Passed 14 Skipped 0 Failed 0
Sourced 2 Test Files.