summaryrefslogtreecommitdiff
path: root/test/ldTest/run-tests.pl
diff options
context:
space:
mode:
authorRr422018-06-04 15:25:44 +0530
committerRr422018-06-04 15:25:44 +0530
commit1f483baf37359032ca3224a5d07853aaf725def4 (patch)
tree040f6aa8f4bf07fd7fff0dd4ab2b874dc54a1fd3 /test/ldTest/run-tests.pl
parent1941edf7847565074fc79f339c8f8e609c5dca9d (diff)
downloadLDMicroGtk-1f483baf37359032ca3224a5d07853aaf725def4.tar.gz
LDMicroGtk-1f483baf37359032ca3224a5d07853aaf725def4.tar.bz2
LDMicroGtk-1f483baf37359032ca3224a5d07853aaf725def4.zip
Commented all GUI code for core test
Diffstat (limited to 'test/ldTest/run-tests.pl')
-rw-r--r--test/ldTest/run-tests.pl33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/ldTest/run-tests.pl b/test/ldTest/run-tests.pl
new file mode 100644
index 0000000..91e81b8
--- /dev/null
+++ b/test/ldTest/run-tests.pl
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+
+if (not -d 'results/') {
+ mkdir 'results';
+}
+
+$c = 0;
+for $test (<tests/*.ld>) {
+ $output = $test;
+ $output =~ s/^tests/results/;
+ $output =~ s/\.ld$/.hex/;
+
+ unlink $output;
+
+ $cmd = "../ldmicro.exe /c $test $output";
+ system $cmd;
+ $c++;
+}
+
+print "\ndifferences follow:\n";
+@diff = `diff -q results expected`;
+for(@diff) {
+ print " $_";
+}
+$fc = scalar @diff;
+print "($fc difference(s)/$c)\n";
+if($fc == 0) {
+ print "pass!\n";
+ exit(0);
+} else {
+ print "FAIL\n";
+ exit(-1);
+}