We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9251efb commit ae590caCopy full SHA for ae590ca
t/categories/cookbook/13classes-objects-and-ties.t
@@ -0,0 +1,28 @@
1
+use v6;
2
+
3
+use Test;
4
5
+plan 1;
6
7
+subtest {
8
+ plan 1;
9
10
+ my $example-name = "13-01constructing-an-object.pl";
11
+ my $expected-output = "Yes";
12
13
+ my $output = run-example($example-name);
14
+ is($output.chomp, $expected-output, $example-name);
15
+}, "13-01constructing-an-object.pl";
16
17
+#| run the given example script
18
+sub run-example($name, :$script-args = Nil) {
19
+ my $base-dir = "categories/cookbook/13classes-objects-and-ties";
20
+ my $script-path = $base-dir ~ "/" ~ $name;
21
+ my $base-cmd = "perl6 $script-path";
22
+ my $output = $script-args ?? qqx{$base-cmd \"$script-args\"}
23
+ !! qqx{$base-cmd};
24
25
+ return $output;
26
+}
27
28
+# vim: expandtab shiftwidth=4 ft=perl6
0 commit comments