End to end test suite for Mosh sessions.

For original messy development history, see
https://github.com/cgull/mosh/tree/localhost
or
https://github.com/cgull/mosh/commit/e7feed48a4a271e2977f714f58acfa04cdaa5cca
This commit is contained in:
John Hood
2015-09-20 02:25:39 -04:00
parent 4a01dbdb06
commit 307b241f0d
13 changed files with 655 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env perl
#
# The sole function of this script is to provide a stdin that doesn't
# read data or return EOF to its children. If there's a clean,
# portable, not-Perl way to do this, then that should replace this.
#
use warnings;
use strict;
my $pid = open(my $fh, "|-", @ARGV) or die;
waitpid($pid, 0) == $pid or die;
my $rc;
if ($? == 0) {
$rc = 0;
} elsif ($? >= 256) {
$rc = $? >> 8;
} else {
$rc = ($? & 127) | 128;
}
exit $rc;