Last active
May 7, 2017 23:07
-
-
Save VisualMelon/2721bf323dc82ccd568275a340717939 to your computer and use it in GitHub Desktop.
Chris: Office Escape Testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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
You can find all the other test stuff at https://gist.github.com/VisualMelon/b561edf2d1697ae2faa68dd862abff22