Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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'
@VisualMelon

This comment has been minimized.

Copy link
Owner Author

commented May 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.