summaryrefslogtreecommitdiff
path: root/regress/lib/libm
diff options
context:
space:
mode:
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";
+}
+