Permalink
Browse files

[t] more system, require, does, defer, label cleanup

git-svn-id: http://svn.pugscode.org/pugs@22093 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
lwall
lwall committed Sep 2, 2008
1 parent 0de784b commit dfc18a426e539efb61b32d77fc6cfe1f91512d8d
Showing with 10 additions and 10 deletions.
  1. +4 −4 S12-methods/calling_sets.t
  2. +6 −6 S29-os/system-with-spaces.t
@@ -10,6 +10,10 @@ use Test; plan 17;
# are also "dot" variants that call some number of methods with the same name:
# $object.?meth # calls method if there is one, otherwise undef
+
+role plugin_1 { multi method init_hook { $.cnt += 2 } }
+role plugin_2 { multi method init_hook { $.cnt += 3 } }
+
class Parent {
has Int $.cnt is rw;
does plugin_1;
@@ -21,10 +25,6 @@ class Child is Parent {
method child_only {'child_only'}
}
-role plugin_1 { multi method init_hook { $.cnt += 2 } }
-role plugin_2 { multi method init_hook { $.cnt += 3 } }
-
-
{
my $test = q"$object.?meth calls method if there is one";
my $object = Child.new;
@@ -16,9 +16,9 @@ if $?OS ne 'MSWin32' {
=begin pod
-Test the interaction of system(LIST) and whitespace characters. In
-an ideal world, system() does Just Enough quoting of the parameters
-that system(LIST) is sane. On *nix-like platforms, system(LIST)
+Test the interaction of run(LIST) and whitespace characters. In
+an ideal world, run() does Just Enough quoting of the parameters
+that run(LIST) is sane. On *nix-like platforms, run(LIST)
is an actual system call, so there should be no additional logic needed.
On Win32, system(LIST) does not exist and is mostly implemented as
system("@LIST") , so additional quoting magic is needed.
@@ -33,7 +33,7 @@ Haskell's automagic quoting seems to be amazingly good though.
=end pod
-# Win32 specific tests for system() being sane enough
+# Win32 specific tests for run() being sane enough
my $cwdb = $*CWD;
my $cwd = $cwdb;
@@ -147,7 +147,7 @@ for @command -> $cmd {
my $prog = "perl6-temprun-test-" ~ ($counter++) ~ ".tmp";
my $fh = open($prog, :w);
- $fh.say("system(");
+ $fh.say("run(");
#say @cmd;
#say @args;
for @cmd, @args -> $l {
@@ -181,7 +181,7 @@ for @command -> $cmd {
my $expected = "[" ~ $cmd ~ "][" ~ @args.join("][") ~ "]";
my $name = "|" ~ @cmd.join("*") ~ "| with [" ~ @args.join("][") ~ "]";
- if (! system($pugs ~ " " ~ $prog ~ "> " ~ $outfile)) {
+ if (! run($pugs ~ " " ~ $prog ~ "> " ~ $outfile)) {
fail($name);
diag slurp $prog;
next();

0 comments on commit dfc18a4

Please sign in to comment.