Skip to content

Commit 03672cc

Browse files
committed
Merge branch 'master' into posix-spawn-chdir
2 parents 73af64e + 332f123 commit 03672cc

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

build_win.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,34 @@ if not exist build\boot mkdir build\boot
4141
@rem Build the bootstrap interpreter
4242
for %%f in (src\core\*.c) do (
4343
%JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f
44-
@if not errorlevel 0 goto :BUILDFAIL
44+
@if errorlevel 1 goto :BUILDFAIL
4545
)
4646
for %%f in (src\boot\*.c) do (
4747
%JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f
48-
@if not errorlevel 0 goto :BUILDFAIL
48+
@if errorlevel 1 goto :BUILDFAIL
4949
)
5050
%JANET_LINK% /out:build\janet_boot.exe build\boot\*.obj
51-
@if not errorlevel 0 goto :BUILDFAIL
51+
@if errorlevel 1 goto :BUILDFAIL
5252
build\janet_boot . > build\c\janet.c
53-
@if not errorlevel 0 goto :BUILDFAIL
53+
@if errorlevel 1 goto :BUILDFAIL
5454

5555
@rem Build the sources
5656
%JANET_COMPILE% /Fobuild\janet.obj build\c\janet.c
57-
@if not errorlevel 0 goto :BUILDFAIL
57+
@if errorlevel 1 goto :BUILDFAIL
5858
%JANET_COMPILE% /Fobuild\shell.obj src\mainclient\shell.c
59-
@if not errorlevel 0 goto :BUILDFAIL
59+
@if errorlevel 1 goto :BUILDFAIL
6060

6161
@rem Build the resources
6262
rc /nologo /fobuild\janet_win.res janet_win.rc
63-
@if not errorlevel 0 goto :BUILDFAIL
63+
@if errorlevel 1 goto :BUILDFAIL
6464

6565
@rem Link everything to main client
6666
%JANET_LINK% /out:janet.exe build\janet.obj build\shell.obj build\janet_win.res
67-
@if not errorlevel 0 goto :BUILDFAIL
67+
@if errorlevel 1 goto :BUILDFAIL
6868

6969
@rem Build static library (libjanet.lib)
7070
%JANET_LINK_STATIC% /out:build\libjanet.lib build\janet.obj
71-
@if not errorlevel 0 goto :BUILDFAIL
71+
@if errorlevel 1 goto :BUILDFAIL
7272

7373
echo === Successfully built janet.exe for Windows ===
7474
echo === Run 'build_win test' to run tests. ==
@@ -102,7 +102,7 @@ exit /b 0
102102
:TEST
103103
for %%f in (test/suite*.janet) do (
104104
janet.exe test\%%f
105-
@if not errorlevel 0 goto TESTFAIL
105+
@if errorlevel 1 goto TESTFAIL
106106
)
107107
exit /b 0
108108

test/suite-ev.janet

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,7 @@
430430
# Now do our telnet chat
431431
(def bob (assert (net/connect test-host test-port :stream)))
432432
(expect-read bob "Whats your name?\n")
433-
(if (= :mingw (os/which))
434-
(net/write bob "bob")
435-
(do
436-
(def fbob (ev/to-file bob))
437-
(file/write fbob "bob")
438-
(file/flush fbob)
439-
(:close fbob)))
433+
(net/write bob "bob")
440434
(expect-read bob "Welcome bob\n")
441435
(def alice (assert (net/connect test-host test-port)))
442436
(expect-read alice "Whats your name?\n")
@@ -569,7 +563,8 @@
569563
(ev/gather
570564
(os/proc-wait p)
571565
(ev/slurp (p :out))))
566+
(def data (string/replace-all "\r" "" data))
572567
(assert (zero? exit-code) "subprocess ran")
573-
(assert (deep= data @"hi\nthere\n") "output is correct")
568+
(assert (= data "hi\nthere\n") "output is correct")
574569

575570
(end-suite)

0 commit comments

Comments
 (0)