chiark / gitweb /
Infrastructure: Switch testing over to Autotest.
[mLib] / utils / tests.at
diff --git a/utils/tests.at b/utils/tests.at
new file mode 100644 (file)
index 0000000..3b216fc
--- /dev/null
@@ -0,0 +1,62 @@
+### -*-autotest-*-
+###
+### Test script for utilities
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+###--------------------------------------------------------------------------
+### Tests.
+
+## bits
+AT_SETUP([utilities: bits])
+AT_KEYWORDS([utils bits])
+for seed in 0xaca98e08 0x0b6e95fb ""; do
+  $PYTHON SRCDIR/t/bits-testgen.py $seed >bits.tests
+  AT_CHECK([BUILDDIR/t/bits.t -f bits.tests], [0], [ignore], [ignore])
+done
+AT_CLEANUP
+
+## exc
+AT_SETUP([utilities: exc])
+AT_KEYWORDS([utils exc])
+AT_DATA([expout],
+[apple
+banana
+cabbage
+dibble
+exc type 2 (excession)
+fennel
+65 exception (val = 53)
+hello! __exc_list = (nil)
+])
+AT_CHECK([BUILDDIR/t/exc.t], [0], [expout])
+AT_CLEANUP
+
+## versioncmp
+AT_SETUP([utilities: versioncmp])
+AT_KEYWORDS([utils versioncmp])
+AT_CHECK([BUILDDIR/t/versioncmp.t -f SRCDIR/t/versioncmp.tests],
+        [0], [ignore], [ignore])
+AT_CLEANUP
+
+###----- That's all, folks --------------------------------------------------