summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-10 22:19:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-10 22:19:25 -0700
commitde63498e38f82c7a795c38d18ba6000c54a0f7de (patch)
treea14880a2b3a82d48c07eb81178ada6ae0f45307c /tests
parent8c9a6b896ef0cef0cbef7696b30015aba2ed2ae5 (diff)
downloadtxr-de63498e38f82c7a795c38d18ba6000c54a0f7de.tar.gz
txr-de63498e38f82c7a795c38d18ba6000c54a0f7de.tar.bz2
txr-de63498e38f82c7a795c38d18ba6000c54a0f7de.zip
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/017/str-s.tl2
-rw-r--r--tests/018/forkflush.tl13
-rw-r--r--tests/019/load-search.tl17
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))