X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=run-tests.m;h=08b0f765f2609c8ff02aca3bcab7ec28f33b62be;hp=ef72b10731fecb8f6f324d4b25150153140af948;hb=6cd387b2e42c3273c6cd48ad2e7e551bddd86474;hpb=62d652799ded51169bda744d8728e1d33582fa5f diff --git a/run-tests.m b/run-tests.m index ef72b10..08b0f76 100755 --- a/run-tests.m +++ b/run-tests.m @@ -1,15 +1,14 @@ #!/usr/bin/octave --silent +# +# You'll need to use the .octaverc in this directory to get the proper +# paths. +# -unit_init(1, {}); +addpath('./unit_test'); -unit_test_equals("sin[0] == 0", ... - 0, ... - divided_difference(@sin, 0)); +unit_init(1, {}); -unit_test_equals("sin[0, pi] == 0", ... - 0, ... - divided_difference(@sin, [0,pi])); +test_files = glob('tests/*.m'); -unit_test_equals("sin[0, pi, 2*pi] == 0", ... - 0, ... - divided_difference(@sin, [0,pi,2*pi])); +## Source every file that matches the glob above. +cellfun(@source, test_files);