Chris: Office Escape Testing
# Can used with test.ps1 | |
# > . .\test.ps1 chrisstrap.ps1 | |
# Expects perl (5) to be installed, and chris.pl to be in the current directory | |
# | |
# You can investigate issues by first writing the solution to a file... | |
# > type .\testcase0.txt | . .\chrisstrap.ps1 > chrissol0.txt | |
# ... and then feeding it to OfficeEscapeSolver.exe | |
# > type .\testcase0.txt | . .\OfficeEscapeSolver.exe * .\chrissol0.txt | |
# Which will (hopefully) provide helpful information | |
$s = "" | |
$c = 0 | |
$input | % { | |
$s += $_; | |
if ($c -eq 0) | |
{ | |
$s += "`n"; | |
} | |
else | |
{ | |
$s += ":"; | |
} | |
$c = 1; | |
} | |
# ref: http://stackoverflow.com/a/16334189/383598 | |
$s | & cmd /c 'perl chris.pl 2>&1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
You can find all the other test stuff at https://gist.github.com/VisualMelon/b561edf2d1697ae2faa68dd862abff22