Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 33 lines (22 sloc) 1.181 kB
cc8fc78 [gsoc_spectest] minimal whitespace test. (added 8 tests)
Auzon authored
1 use v6;
2
3 use Test;
4
ee1cf20 @kyleha [minimal-whitespace.t] Test for RT 80330
kyleha authored
5 plan 9;
cc8fc78 [gsoc_spectest] minimal whitespace test. (added 8 tests)
Auzon authored
6
7 # L<S03/Minimal whitespace DWIMmery/Whitespace is no longer allowed before>
8
9 my @arr = <1 2 3 4 5>;
10 eval_dies_ok('@arr [0]', 'array with space before opening brackets does not work');
11
12 my %hash = {a => 1, b => 2};
13 eval_dies_ok('%hash <a>', 'hash with space before opening brackets does not work (1)');
14 eval_dies_ok('%hash {"a"}', 'hash with space before opening braces does not work (2)');
15
3ceaedb [t/spec] deleted bogus syntax test
moritz authored
16 # XXX this one is wrong, it's parsed as code( (5) )
17 # STD.pm agrees on that.
18 #sub code (Int $a) {2 * $a}
19 #eval_dies_ok('code (5)', 'sub call with space before opening parens does not work');
cc8fc78 [gsoc_spectest] minimal whitespace test. (added 8 tests)
Auzon authored
20
21 class Thing {method whatever (Int $a) {3 * $a}}
22 eval_dies_ok('Thing .new', 'whitespace is not allowed before . after class name');
23 eval_dies_ok('Thing. new', 'whitespace is not allowed after . after class name');
24
25 my $o = Thing.new;
26 eval_dies_ok('$o .whatever(5)', 'whitespace is not allowed before . before method');
27 eval_dies_ok('$o. whatever(5)', 'whitespace is not allowed after . before method');
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
28
2e90102 @moritz refudge minimal-whitespace.t
moritz authored
29 eval_lives_ok 'my @rt80330; [+] @rt80330', 'a [+] with whitespace works';
ee1cf20 @kyleha [minimal-whitespace.t] Test for RT 80330
kyleha authored
30 eval_dies_ok 'my @rt80330; [+]@rt80330', 'a [+] without whitespace dies';
31
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
32 # vim: ft=perl6
Something went wrong with that request. Please try again.