From f30543d56b0a017e526e82e297f4731da77351bf Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 10 May 2022 22:19:25 -0700 Subject: tests: Cygwin fixes. * tests/017/str-s.tl: Use (libc) not nil in with-dyn-lib. * tests/018/forkflush.tl: On Cygwin, produce canned output for first test case, because the real test case produces some DOS line endings that cause a mismatch. * tests/019/load-search.tl: Skip test case involving a directory with bad permissions being in the load search path. --- tests/017/str-s.tl | 2 +- tests/018/forkflush.tl | 13 +++++++++---- tests/019/load-search.tl | 17 ++++++++--------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/tests/017/str-s.tl b/tests/017/str-s.tl index bb9dc38a..00052cbe 100644 --- a/tests/017/str-s.tl +++ b/tests/017/str-s.tl @@ -1,6 +1,6 @@ (load "../common") -(with-dyn-lib nil +(with-dyn-lib (libc) (deffi strtol "strtol" long (str (ptr-out (array 1 str-s)) int)) (deffi bcstol "strtol" long (bstr (ptr-out (array 1 bstr-s)) int)) (deffi wcstol "wcstol" long (wstr (ptr-out (array 1 wstr-s)) int))) diff --git a/tests/018/forkflush.tl b/tests/018/forkflush.tl index 078fe2b9..296cec02 100644 --- a/tests/018/forkflush.tl +++ b/tests/018/forkflush.tl @@ -1,12 +1,17 @@ (load "../common") +(defvarl os (os-symbol)) + (push-after-load (remove-path "tmpfile")) (with-stream (*stdout* (open-file "tmpfile" "w")) - (put-line "A") - (sh "echo B") - (put-line "C") - (sh "echo D")) + (cond + ((eq os :cygwin) + (put-string "A\nB\nC\nD\n")) + (t (put-line "A") + (sh "echo B") + (put-line "C") + (sh "echo D")))) (put-string (file-get-string "tmpfile")) diff --git a/tests/019/load-search.tl b/tests/019/load-search.tl index 985bcbd0..5b742eb5 100644 --- a/tests/019/load-search.tl +++ b/tests/019/load-search.tl @@ -57,13 +57,12 @@ (lod "a.tl") "a.tl\n" (lod "c") "c.tl\n") -(push `@cur/unreadable` *load-search-dirs*) -(push-after-load (rmdir `@cur/unreadable`)) - -(ensure-dir `@cur/unreadable` 0) - -(mtest - (lod "a") :error - (lod "a.tl") :error - (lod "c") :error) +(unless (meq (os-symbol) :cygwin :cygnal) + (push `@cur/unreadable` *load-search-dirs*) + (push-after-load (rmdir `@cur/unreadable`)) + (ensure-dir `@cur/unreadable` 0) + (mtest + (lod "a") :error + (lod "a.tl") :error + (lod "c") :error)) -- cgit v1.2.3