чување 412d6314d39170393fe0c4a2f14c04d2a33c320e
родитељ 72dab88769120f124df3b396f61e0d71dc0a52f0
Аутор: Страхиња Радић <sr@strahinja.org>
Датум: Thu, 5 Feb 2026 20:13:07 +0100
Synchronize testsuite to sled
Diffstat:
измењених датотека: 4, додавања: 21(+), брисања: 20(-)
diff --git a/Makefile b/Makefile
@@ -72,7 +72,8 @@ uninstall:
rmdir $(BINDIR) 2>/dev/null || true
test: all
- sh lib/runtests
+ command -v perl >/dev/null || { echo Test suite requires perl; exit 1; }
+ perl lib/runtests
pack:
sh -x lib/mkpack
diff --git a/lib/runtests b/lib/runtests
@@ -12,8 +12,8 @@ my @files;
my $maxlen = 60;
my $testdir = 'tests';
-system("sh -c 'command -v expect' >/dev/null") == 0 ||
- die "Test suite requires expect";
+#system("sh -c 'command -v expect' >/dev/null") == 0 ||
+# die "Test suite requires expect";
find(sub {
push @files, $File::Find::name if (/\.test$/);
diff --git a/tests/overflow_line.sh b/tests/overflow_line.sh
@@ -1,17 +0,0 @@
-#!/bin/sh
-# vim: set ft=bash:
-printf "Testing line >BUFSIZE:\t"
-exec 2>/dev/null
-if { for j in $(seq 300)
- do
- printf "0123456789"
- done
- printf "\n"
- } |
- ./slweb 2>/dev/null >&2
-then
- printf " OK"
-else
- printf "FAIL"
-fi
-printf "%s\n" "$output"
diff --git a/tests/overflow_line.test b/tests/overflow_line.test
@@ -0,0 +1,17 @@
+#!/bin/sh
+# vim: set ft=bash:
+printf "Testing line >BUFSIZE:\t"
+exec 2>/dev/null
+if { for j in $(seq 300)
+ do
+ printf "0123456789"
+ done
+ printf "\n"
+ } |
+ ./slweb 2>/dev/null >&2
+then
+ result=0
+else
+ result=1
+fi
+exit "$result"