summaryrefslogtreecommitdiff
path: root/regress/lib/libm
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-06-08 08:30:06 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-06-08 08:30:06 +0000
commit7ca2acd8ffd3ee00ce563ae9048502a843551f8f (patch)
tree9a67bc79f83130a01d6e43582557066f487ee654 /regress/lib/libm
parent92bf4b9d37c8e1c4f8bab641754c0f8bacaec906 (diff)
Really simple test that shouldn't fail, but does on some arch's (ok, one
arch, sparc64)
Diffstat (limited to 'regress/lib/libm')
-rw-r--r--regress/lib/libm/trivial1/Makefile8
-rw-r--r--regress/lib/libm/trivial1/test-fp.out2
-rw-r--r--regress/lib/libm/trivial1/test-fp.pl10
3 files changed, 20 insertions, 0 deletions
diff --git a/regress/lib/libm/trivial1/Makefile b/regress/lib/libm/trivial1/Makefile
new file mode 100644
index 00000000000..8a15b41025d
--- /dev/null
+++ b/regress/lib/libm/trivial1/Makefile
@@ -0,0 +1,8 @@
+
+PERL=perl
+REGRESSTARGETS=test-fp
+
+test-fp: test-fp.pl
+ ${PERL} ${.CURDIR}/$@.pl | diff -u - ${.CURDIR}/test-fp.out
+
+.include <bsd.regress.mk>
diff --git a/regress/lib/libm/trivial1/test-fp.out b/regress/lib/libm/trivial1/test-fp.out
new file mode 100644
index 00000000000..1b2d3dc78ee
--- /dev/null
+++ b/regress/lib/libm/trivial1/test-fp.out
@@ -0,0 +1,2 @@
+13
+119
diff --git a/regress/lib/libm/trivial1/test-fp.pl b/regress/lib/libm/trivial1/test-fp.pl
new file mode 100644
index 00000000000..0ebb77fcabf
--- /dev/null
+++ b/regress/lib/libm/trivial1/test-fp.pl
@@ -0,0 +1,10 @@
+#!/bin/perl
+
+$a = 113549;
+
+while ($a >= 128) {
+ $x = $a % 128;
+ $a /= 128;
+ print "$x\n";
+}
+