Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9d64d20bfb
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (24 sloc) 0.877 kb
use v6;
use Test;
use ISO_10303_21::Grammar;
for (0..9)».Str -> $digit {
my $match = ISO_10303_21::Grammar.parse($digit, :rule<digit>);
isa_ok $match, Match, "<digit> matches $digit - 1";
ok $match, "<digit> matches $digit - 2";
}
for 'a'..'z' -> $lower {
my $match = ISO_10303_21::Grammar.parse($lower, :rule<lower>);
isa_ok $match, Match, "<lower> matches $lower - 1";
ok $match, "<lower> matches $lower - 2";
}
for 'A'..'Z' -> $upper {
my $match = ISO_10303_21::Grammar.parse($upper, :rule<upper>);
isa_ok $match, Match, "<upper> matches $upper - 1";
ok $match, "<upper> matches $upper - 2";
}
for '!"*$%&.#+,-()?/:;<=>@[]{|}^`~'.comb -> $symbol {
my $match = ISO_10303_21::Grammar.parse($symbol, :rule<special>);
isa_ok $match, Match, "<special> matches $symbol - 1";
ok $match, "<special> matches $symbol - 2";
}
done;
Jump to Line
Something went wrong with that request. Please try again.