diff --git a/S16-io/eof.t b/S16-io/eof.t index a4e8776dfe..a52d4fe0d7 100644 --- a/S16-io/eof.t +++ b/S16-io/eof.t @@ -83,6 +83,8 @@ subtest '.eof on empty files' => { subtest "reading from '$p'" => { plan 3; when not $p.e { skip "don't have '$p' available", 3 } + # issue 1533 was all about line-by-line reading, so this skip seems reasonable: + when $*KERNEL.name eq 'sunos' { skip "'$p' is a binary file on Solaris", 3 } with $p.open { is-deeply .eof, False, 'eof is False before any reads'; cmp-ok .get, &[!~~], Nil, '.get reads something'; diff --git a/S29-os/system.t b/S29-os/system.t index 06eee5347c..4d1da723f8 100644 --- a/S29-os/system.t +++ b/S29-os/system.t @@ -103,10 +103,21 @@ throws-like { shell("program_that_does_not_exist_ignore_errors_please.exe") }, subtest "run and shell's :cwd" => { plan 4; + # So... + # `echo $PWD` works *nearly* everywhere, because the shell sets the + # environment variable PWD to the current directory on startup. + # Except on Solaris, where /bin/sh only sets $PWD to the current directory + # if it happens to be / or the user's home directory. + # Otherwise it leaves it unchanged. + # (Even AIX isn't this nuts. Why is ksh93 so special?) + # Which matters to this test, because we (eg MoarVM) call chdir to our temp + # directory before we exec the shell, and we don't change PWD in our C + # environment. + # So use pwd instead. And use `exec pwd` to test that we have run the shell. my @run-cmd = $*DISTRO.is-win ?? ('cmd.exe', '/C', 'echo %CD%') - !! ('/bin/sh', '-c', 'echo $PWD'); + !! ('/bin/sh', '-c', 'exec pwd'); my $shell-cmd = $*DISTRO.is-win ?? 'echo %CD%' - !! 'echo $PWD'; + !! 'exec pwd'; indir (my $cwd = make-temp-dir.absolute), { (my $p = run @run-cmd, :!err, :out)