about summary refs log tree commit diff
path: root/test/pgmnoise.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/pgmnoise.test')
-rwxr-xr-xtest/pgmnoise.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/pgmnoise.test b/test/pgmnoise.test
new file mode 100755
index 00000000..0b38553b
--- /dev/null
+++ b/test/pgmnoise.test
@@ -0,0 +1,23 @@
+#! /bin/bash
+# This script tests: pgmnoise
+# Also requires:
+
+
+# We first check whether random number generator is glibc rand().
+# If not, this test is skipped.
+
+testrandom
+
+case $? in
+   81)
+        # Should print: 1663614689 10015
+        pgmnoise --randomseed=0 100 100 | cksum ;;
+
+        # Any additional tests go here.
+
+   8[02-9] | 90)
+        echo "Skipping: random number generator is not glibc." 1>&2
+        exit 80;;
+
+   *)   exit 1;;  # testrandom failed
+esac