Skip to content

Commit

Permalink
[spectest] A little fudging for Rakudo.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@20340 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
jnthn committed May 1, 2008
1 parent 1a3b0cc commit dde9bc4
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 18 deletions.
26 changes: 26 additions & 0 deletions S02-literals/autoref.t
Expand Up @@ -28,6 +28,8 @@ plan 57;
}

# Explicit referentiation of arrays in assignment
#?rakudo 1 skip "parse error"
#?DOES 2
{
my @array = <a b c>;
my $ref = \@array;
Expand All @@ -46,6 +48,8 @@ plan 57;
}

# Explicit referentiation of hashes in assignment
#?rakudo 1 skip "parse error"
#?DOES 2
{
my %hash = (a => 1, b => 2, c => 3);
my $ref = \%hash;
Expand All @@ -66,6 +70,8 @@ plan 57;
}

# Explicit referentiation of arrays in assignment to an array element
#?rakudo 1 skip "parse error"
#?DOES 3
{
my @array = <a b c>;
my @other;
Expand All @@ -87,6 +93,8 @@ plan 57;
}

# Explicit referentiation of hashes in assignment to an array element
#?rakudo 1 skip "parse error"
#?DOES 2
{
my %hash = (a => 1, b => 2, c => 3);
my @other;
Expand All @@ -107,6 +115,8 @@ plan 57;
}

# Explicit referentiation of arrays in assignment to a hash element
#?rakudo 1 skip "parse error"
#?DOES 2
{
my @array = <a b c>;
my %other;
Expand All @@ -127,6 +137,8 @@ plan 57;
}

# Explicit referentiation of hashes in assignment to a hash element
#?rakudo 1 skip "parse error"
#?DOES 2
{
my %hash = (a => 1, b => 2, c => 3);
my %other;
Expand All @@ -146,6 +158,8 @@ plan 57;
}

# Explicit referentiation of arrays in pair creation with key => ...
#?rakudo 1 skip "parse error"
#?DOES 2
{
my @array = <a b c>;
my $pair = (key => \@array);
Expand All @@ -164,6 +178,8 @@ plan 57;
}

# Explicit referentiation of hashes in pair creation with key => ...
#?rakudo 1 skip "parse error"
#?DOES 2
{
my %hash = (a => 1, b => 2, c => 3);
my $pair = (key => \%hash);
Expand All @@ -182,6 +198,8 @@ plan 57;
}

# Explicit referentiation of arrays in pair creation with :key(...)
#?rakudo 1 skip "parse error"
#?DOES 2
{
my @array = <a b c>;
my $pair = (:key(\@array));
Expand All @@ -199,6 +217,8 @@ plan 57;
is +$pair.value.values, 3, '(:key(%hash)) works (2)';
}

#?rakudo 1 skip "parse error"
#?DOES 2
# Explicit referentiation of hashes in pair creation with :key(...)
{
my %hash = (a => 1, b => 2, c => 3);
Expand Down Expand Up @@ -255,6 +275,8 @@ plan 57;
}

# Implicit referentiation of array literals in pair creation with ... => "value"
#?rakudo 1 skip "parse error"
#?DOES 2
{
my $pair = (<a b c> => "value");

Expand All @@ -263,6 +285,8 @@ plan 57;
}

# Arrayref literals in pair creation with ... => "value"
#?rakudo 1 skip "parse error"
#?DOES 2
{
my $pair = ([<a b c>] => "value");

Expand All @@ -271,6 +295,8 @@ plan 57;
}

# Hashref literals in pair creation with ... => "value"
#?rakudo 1 skip "parse error"
#?DOES 1
{
my $pair = ({ a => 1, b => 2 } => "value");

Expand Down
28 changes: 16 additions & 12 deletions S02-literals/hex_chars.t
Expand Up @@ -4,18 +4,22 @@ use Test;
plan 4;

#L<S02/Literals/"Characters indexed by hex numbers">
my %unicode = (
'a' => "\x61",
'æ' => "\xE6",
'' => "\x5583",
'𨮁' => "\x28B81",
);
#?rakudo skip "parse error"
#?DOES 4
{
my %unicode = (
'a' => "\x61",
'æ' => "\xE6",
'' => "\x5583",
'𨮁' => "\x28B81",
);

for %unicode.kv -> $literal, $codepoint {
is(
$codepoint,
$literal,
'Does a character codepoint (\x..) evaluate to the same thing as its literal?'
);
for %unicode.kv -> $literal, $codepoint {
is(
$codepoint,
$literal,
'Does a character codepoint (\x..) evaluate to the same thing as its literal?'
);
}
}

2 changes: 2 additions & 0 deletions S04-statements/try.t
Expand Up @@ -20,6 +20,8 @@ plan 25;
is ~@array, "42", '@array = try {...} worked (2)';
}

#?rakudo skip "parse error"
#?DOES 2
{
my @array = try { (42,) };
is +@array, 1, '@array = try {...} worked (3)';
Expand Down
8 changes: 2 additions & 6 deletions S29-str/append.t
Expand Up @@ -2,12 +2,8 @@ use v6-alpha;

use Test;

=begin description
String appending with ~ operator
L<S03/Changes to Perl 5 operators/string concatenation becomes stitching>
=end description
# String appending with ~ operator
# L<S03/Changes to Perl 5 operators/string concatenation becomes stitching>

plan 4;

Expand Down
1 change: 1 addition & 0 deletions S29-str/uc.t
Expand Up @@ -10,6 +10,7 @@ force_todo 10;
is(uc("Hello World"), "HELLO WORLD", "simple");
is(uc(""), "", "empty string");
#?rakudo skip "unicode"
#?DOES 3
{
is(uc("åäö"), "ÅÄÖ", "some finnish non-ascii chars");
is(uc("äöü"), "ÄÖÜ", "uc of German Umlauts");
Expand Down

0 comments on commit dde9bc4

Please sign in to comment.