Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two more spectests that need tweaking to work on Solaris #713

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions S16-io/eof.t
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
15 changes: 13 additions & 2 deletions S29-os/system.t
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down