Skip to content

Commit c4b9a11

Browse files
authored
Merge pull request #620 from k-okada/test_618
add test to check #618
2 parents 6e752b5 + 0f94159 commit c4b9a11

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

irteus/irtx.l

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
(setq pname "/usr/X11R6/bin/cygX11-6.dll"))
8989

9090
;; for receiving Window Manager Messages
91-
(if (probe-file pname)
91+
(if (and pname (probe-file pname))
9292
(setq x-lib (load-foreign pname))
9393
(setq x-lib (sys::sysmod)))
9494
(defforeign SetWMProtocols x-lib "XSetWMProtocols" () :integer))

irteus/test/test-file.l

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
;; test code for probe-file
2+
3+
(require :unittest "lib/llib/unittest.l")
4+
(init-unit-test)
5+
6+
;; irteusx errors when a file named 'NIL' exists https://github.com/euslisp/jskeus/pull/618
7+
(deftest nil-file-with-irtx
8+
(let ()
9+
(unix::chdir "/tmp")
10+
(with-open-file (f "NIL" :direction :output)(format f "NIL"))
11+
(assert (load "irteus/irtx.l"))
12+
))
13+
14+
15+
(run-all-tests)
16+
(exit)

0 commit comments

Comments
 (0)