I noticed that there were no tests for the "Lexical Conventions"
section of S02, so I tried my hand at writing some. Unfortunately,
many of them are failing, and I'm new enough to writing Perl 6 tests
that I'm not sure if this is the compiler failing to match the spec or
me failing to write tests ;-)

Can someone tell me which is going on here (I've noted which fail and
which are OK in comments at the end of each test line)?

use v6;
use Test;

plan 7;

# L<S02/Lexical Conventions/Perl can count Unicode line and paragraph
separators>

# See also http://unicode.org/reports/tr13/tr13-9.html
eval_lives_ok "\{ 1 \} \x2029 \{ 1 \}", "Unicode 2029 can terminate
lines"; # Fails

# L<S02/Lexical Conventions/If a character is already used>

eval_lives_ok "q\x298d test \x298e", "Unicode open-298d maps to
close-298e"; # Ok
eval_lives_ok "q\x301d test \x301e", "Unicode open-301d maps to
close-301e"; # Ok
eval_dies_ok "q\x301d test \x301f", "Unicode open-301d does not map to
close-301f"; # Ok
eval_lives_ok "q\x2018 test \x2019", "Unicode open-2018 maps to to
close-2019"; # Fails
eval_lives_ok "q\x201a test \x2019", "Unicode open-201a maps to to
close-2019"; # Fails
eval_lives_ok "q\x2018 \x201a test \x2019", "Alternative open-brakets
treat their other alternates as non-special"; # Fails

done_testing;

# vim: ft=perl6


-- 
Aaron Sherman
Email or GTalk: a...@ajs.com
http://www.ajs.com/~ajs

Reply via email to