File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ $Error.clear()
1313 Compare-Object (Get-Content " $PSScriptRoot \..\test\clockhands_expected" ) |
1414 Assert-MatchTests &&
1515. " $PSScriptRoot \hello.bat" &&
16+ . " $PSScriptRoot \triple.bat" |
17+ Compare-Object (Get-Content " $PSScriptRoot \..\test\triple_expected" ) |
18+ Assert-MatchTests &&
1619ForEach-Object ' foo'
1720
1821if ($Error -or ! $? ) {
Original file line number Diff line number Diff line change 1+ @ ECHO OFF
2+
3+ FOR /L %%c IN (1, 1, 40) DO CALL :FIRST %%c
4+ GOTO :END
5+
6+ :FIRST
7+ FOR /L %%b IN (1, 1, %1 ) DO CALL :SECOND %1 %%b
8+ GOTO :END
9+
10+ :SECOND
11+ FOR /L %%a IN (1, 1, %2 ) DO CALL :THIRD %1 %2 %%a
12+ GOTO :END
13+
14+ :THIRD
15+ SET /A legs = %3 * %3 + %2 * %2
16+ SET /A hyp = %1* %1
17+ IF %legs% EQU %hyp% ECHO %3 , %2 , %1
18+
19+ :END
You can’t perform that action at this time.
0 commit comments