Skip to content

Commit

Permalink
Update test.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga authored Jan 30, 2025
1 parent f4ddf3b commit 4b76551
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,24 @@ rem The format of commands (i.e tests/node/commands.txt) must always contain a n
set "loc=%~dp0tests"

echo Package Manager Test
call metacall npm install is-number
call metacall npm
if %errorlevel%==1 goto :test_fail
call metacall pip
if %errorlevel%==1 goto :test_fail

echo NodeJS tests
set "LOADER_SCRIPT_PATH=%loc%\node"

echo Npm Test
call metacall npm install is-number >> out.txt
call metacall npm install is-number
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo Node metacall test
type "%loc%\node\commands.txt" | metacall ^> out.txt
if %errorlevel%==1 goto :test_fail
findstr "366667" out.txt || goto :test_fail
type out.txt
echo Successfull!!

echo Python tests
Expand All @@ -30,85 +32,85 @@ set "PIP_TARGET=%~dp0metacall\runtimes\python\Lib\site-packages"
set "PATH=%PATH%;%~dp0metacall\runtimes\python;%~dp0metacall\runtimes\python\Scripts;%~dp0metacall\runtimes\python\Lib\site-packages\bin"

echo Pip Test
call metacall pip install PyYAML ^> out.txt
call metacall pip install PyYAML
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo Python metacall test
type "%loc%\python\commands.txt" | metacall ^> out.txt
type "%loc%\python\commands.txt" | metacall ^> out.txt
if %errorlevel%==1 goto :test_fail
findstr "Hello World" out.txt || goto :test_fail
findstr "Hello World" out.txt || goto :test_fail
type out.txt
echo Successfull!!

echo Ruby tests
set "LOADER_SCRIPT_PATH=%loc%\ruby"

echo Gem test
call metacall gem install metacall ^> out.txt
call metacall gem install metacall
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo bundle test
call metacall bundle --version ^> out.txt
call metacall bundle --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo bundler test
call metacall bundler --version ^> out.txt
call metacall bundler --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo erb test
call metacall erb --version ^> out.txt
call metacall erb --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo irb test
call metacall irb --version ^> out.txt
call metacall irb --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo racc test
call metacall racc --version ^> out.txt
call metacall racc --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo rake test
call metacall rake --version ^> out.txt
call metacall rake --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo rbs test
call metacall rbs --version ^> out.txt
call metacall rbs --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo rdbg test
call metacall rdbg --version ^> out.txt
call metacall rdbg --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo rdoc test
call metacall rdoc --version ^> out.txt
call metacall rdoc --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo ri test
call metacall ri --version ^> out.txt
call metacall ri --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

echo typeprof test
call metacall typeprof --version ^> out.txt
call metacall typeprof --version
if %errorlevel%==1 goto :test_fail
echo Successfull!!

type out.txt
DEL out.txt
del out.txt
exit /b 0

:test_fail
echo Test Suite Failed!!
type out.txt
DEL out.txt
del out.txt
exit /b 1

0 comments on commit 4b76551

Please sign in to comment.