mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Merge branch 'master' into posix-spawn-chdir
This commit is contained in:
		| @@ -41,34 +41,34 @@ if not exist build\boot mkdir build\boot | |||||||
| @rem Build the bootstrap interpreter | @rem Build the bootstrap interpreter | ||||||
| for %%f in (src\core\*.c) do ( | for %%f in (src\core\*.c) do ( | ||||||
|     %JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f |     %JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f | ||||||
|     @if not errorlevel 0 goto :BUILDFAIL |     @if errorlevel 1 goto :BUILDFAIL | ||||||
| ) | ) | ||||||
| for %%f in (src\boot\*.c) do ( | for %%f in (src\boot\*.c) do ( | ||||||
|     %JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f |     %JANET_COMPILE% /DJANET_BOOTSTRAP /Fobuild\boot\%%~nf.obj %%f | ||||||
|     @if not errorlevel 0 goto :BUILDFAIL |     @if errorlevel 1 goto :BUILDFAIL | ||||||
| ) | ) | ||||||
| %JANET_LINK% /out:build\janet_boot.exe build\boot\*.obj | %JANET_LINK% /out:build\janet_boot.exe build\boot\*.obj | ||||||
| @if not errorlevel 0 goto :BUILDFAIL | @if errorlevel 1 goto :BUILDFAIL | ||||||
| build\janet_boot . > build\c\janet.c | build\janet_boot . > build\c\janet.c | ||||||
| @if not errorlevel 0 goto :BUILDFAIL | @if errorlevel 1 goto :BUILDFAIL | ||||||
|  |  | ||||||
| @rem Build the sources | @rem Build the sources | ||||||
| %JANET_COMPILE% /Fobuild\janet.obj build\c\janet.c | %JANET_COMPILE% /Fobuild\janet.obj build\c\janet.c | ||||||
| @if not errorlevel 0 goto :BUILDFAIL | @if errorlevel 1 goto :BUILDFAIL | ||||||
| %JANET_COMPILE% /Fobuild\shell.obj src\mainclient\shell.c | %JANET_COMPILE% /Fobuild\shell.obj src\mainclient\shell.c | ||||||
| @if not errorlevel 0 goto :BUILDFAIL | @if errorlevel 1 goto :BUILDFAIL | ||||||
|  |  | ||||||
| @rem Build the resources | @rem Build the resources | ||||||
| rc /nologo /fobuild\janet_win.res janet_win.rc | rc /nologo /fobuild\janet_win.res janet_win.rc | ||||||
| @if not errorlevel 0 goto :BUILDFAIL | @if errorlevel 1 goto :BUILDFAIL | ||||||
|  |  | ||||||
| @rem Link everything to main client | @rem Link everything to main client | ||||||
| %JANET_LINK% /out:janet.exe build\janet.obj build\shell.obj build\janet_win.res | %JANET_LINK% /out:janet.exe build\janet.obj build\shell.obj build\janet_win.res | ||||||
| @if not errorlevel 0 goto :BUILDFAIL | @if errorlevel 1 goto :BUILDFAIL | ||||||
|  |  | ||||||
| @rem Build static library (libjanet.lib) | @rem Build static library (libjanet.lib) | ||||||
| %JANET_LINK_STATIC% /out:build\libjanet.lib build\janet.obj | %JANET_LINK_STATIC% /out:build\libjanet.lib build\janet.obj | ||||||
| @if not errorlevel 0 goto :BUILDFAIL | @if errorlevel 1 goto :BUILDFAIL | ||||||
|  |  | ||||||
| echo === Successfully built janet.exe for Windows === | echo === Successfully built janet.exe for Windows === | ||||||
| echo === Run 'build_win test' to run tests. == | echo === Run 'build_win test' to run tests. == | ||||||
| @@ -102,7 +102,7 @@ exit /b 0 | |||||||
| :TEST | :TEST | ||||||
| for %%f in (test/suite*.janet) do ( | for %%f in (test/suite*.janet) do ( | ||||||
|     janet.exe test\%%f |     janet.exe test\%%f | ||||||
|     @if not errorlevel 0 goto TESTFAIL |     @if errorlevel 1 goto TESTFAIL | ||||||
| ) | ) | ||||||
| exit /b 0 | exit /b 0 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -430,13 +430,7 @@ | |||||||
| # Now do our telnet chat | # Now do our telnet chat | ||||||
| (def bob (assert (net/connect test-host test-port :stream))) | (def bob (assert (net/connect test-host test-port :stream))) | ||||||
| (expect-read bob "Whats your name?\n") | (expect-read bob "Whats your name?\n") | ||||||
| (if (= :mingw (os/which)) |  | ||||||
| (net/write bob "bob") | (net/write bob "bob") | ||||||
|   (do |  | ||||||
|     (def fbob (ev/to-file bob)) |  | ||||||
|     (file/write fbob "bob") |  | ||||||
|     (file/flush fbob) |  | ||||||
|     (:close fbob))) |  | ||||||
| (expect-read bob "Welcome bob\n") | (expect-read bob "Welcome bob\n") | ||||||
| (def alice (assert (net/connect test-host test-port))) | (def alice (assert (net/connect test-host test-port))) | ||||||
| (expect-read alice "Whats your name?\n") | (expect-read alice "Whats your name?\n") | ||||||
| @@ -569,7 +563,8 @@ | |||||||
|   (ev/gather |   (ev/gather | ||||||
|     (os/proc-wait p) |     (os/proc-wait p) | ||||||
|     (ev/slurp (p :out)))) |     (ev/slurp (p :out)))) | ||||||
|  | (def data (string/replace-all "\r" "" data)) | ||||||
| (assert (zero? exit-code) "subprocess ran") | (assert (zero? exit-code) "subprocess ran") | ||||||
| (assert (deep= data @"hi\nthere\n") "output is correct") | (assert (= data "hi\nthere\n") "output is correct") | ||||||
|  |  | ||||||
| (end-suite) | (end-suite) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose