mirror of
https://github.com/janet-lang/janet
synced 2025-01-06 22:00:27 +00:00
filewatch on mingw has same semantics as windows
This commit is contained in:
parent
b63b3bef74
commit
c0e508e334
@ -24,7 +24,7 @@
|
|||||||
(assert true)
|
(assert true)
|
||||||
|
|
||||||
(def chan (ev/chan 1000))
|
(def chan (ev/chan 1000))
|
||||||
(def is-win (= :windows (os/which)))
|
(def is-win (or (= :mingw (os/which)) (= :windows (os/which))))
|
||||||
(def is-linux (= :linux (os/which)))
|
(def is-linux (= :linux (os/which)))
|
||||||
|
|
||||||
# Test GC
|
# Test GC
|
||||||
@ -64,15 +64,12 @@
|
|||||||
(rmrf td2)
|
(rmrf td2)
|
||||||
(os/mkdir td1)
|
(os/mkdir td1)
|
||||||
(os/mkdir td2)
|
(os/mkdir td2)
|
||||||
(case (os/which)
|
(when is-win
|
||||||
:windows
|
(filewatch/add fw td1 :last-write :last-access :file-name :dir-name :size :attributes :recursive)
|
||||||
(do
|
(filewatch/add fw td2 :last-write :last-access :file-name :dir-name :size :attributes))
|
||||||
(filewatch/add fw td1 :last-write :last-access :file-name :dir-name :size :attributes :recursive)
|
(when is-linux
|
||||||
(filewatch/add fw td2 :last-write :last-access :file-name :dir-name :size :attributes))
|
(filewatch/add fw td1 :close-write :create :delete)
|
||||||
# default
|
(filewatch/add fw td2 :close-write :create :delete :ignored))
|
||||||
(do
|
|
||||||
(filewatch/add fw td1 :close-write :create :delete)
|
|
||||||
(filewatch/add fw td2 :close-write :create :delete :ignored)))
|
|
||||||
(assert-no-error "filewatch/listen no error" (filewatch/listen fw))
|
(assert-no-error "filewatch/listen no error" (filewatch/listen fw))
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user