Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
rakudo nom fudging.
  • Loading branch information
coke committed Sep 18, 2011
1 parent 47a4fa9 commit ca8ada6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions S06-other/main-usage.t
Expand Up @@ -7,6 +7,7 @@ BEGIN { @*INC.push: 't/spec/packages' }

use Test::Util;

#?rakudo todo 'nom regression'
is_run 'sub MAIN($x) { }; sub USAGE() { print "usage() called" }',
{
out => 'usage() called',
Expand All @@ -20,20 +21,23 @@ is_run 'sub MAIN() { print "main() called" }; sub USAGE() { print "usage() calle
},
'a user-defined USAGE sub not is called if MAIN-dispatch succeeds';

#?rakudo todo 'nom regression'
is_run 'sub MAIN($foo) { }',
{
err => /<< foo >>/,
out => '',
},
'automaticly generated USAGE message contains parameter name';

#?rakudo todo 'nom regression'
is_run 'sub MAIN($x) { };',
{
out => /<< x >>/,
},
:args['--help'],
'--help triggers a message to $*OUT';

#?rakudo todo 'nom regression'
is_run 'sub MAIN(Bool :$x) { say "yes" if $x }',
{
out => "yes\n",
Expand All @@ -43,41 +47,47 @@ is_run 'sub MAIN(Bool :$x) { say "yes" if $x }',
:args['--x'],
'boolean option +';

#?rakudo todo 'nom regression'
is_run 'sub MAIN(Bool :$x) { print "yes" if $x }',
{
out => "",
},
:args['--/x'],
'boolean option -';

#?rakudo todo 'nom regression'
is_run 'sub MAIN(:$x) { print $x }',
{
out => "23",
},
:args['--x=23'],
'option with value';

#?rakudo todo 'nom regression'
is_run 'sub MAIN(:$x) { print $x }',
{
out => "23",
},
:args['--x', '23'],
'option with spacey value';

#?rakudo todo 'nom regression'
is_run 'sub MAIN(:xen(:$x)) { print $x }',
{
out => "23",
},
:args['--xen', '23'],
'long option with spacey value';

#?rakudo todo 'nom regression'
is_run 'sub MAIN(:xen(:$xin)) { print $xin }',
{
out => "23",
},
:args['--xin', '23'],
'named aliases';

#?rakudo todo 'nom regression'
is_run 'sub MAIN(:xen(:$x)) { print $x }',
{
out => "23",
Expand All @@ -86,6 +96,7 @@ is_run 'sub MAIN(:xen(:$x)) { print $x }',
'short option with spacey value';

# RT #71366
#?rakudo todo 'nom regression'
is_run 'sub MAIN($a, :$var) { say "a: $a, optional: $var"; }',
{
err => /\-\-var/,
Expand All @@ -94,6 +105,7 @@ is_run 'sub MAIN($a, :$var) { say "a: $a, optional: $var"; }',
:args['param', '--var'],
'Non Bool option last with no value';

#?rakudo todo 'nom regression'
is_run 'sub MAIN($a, Bool :$var) { say "a: $a, optional: $var"; }',
{
out => "a: param, optional: Bool::True\n",
Expand Down
2 changes: 2 additions & 0 deletions S19-command-line/dash-e.t
Expand Up @@ -14,6 +14,7 @@ is_run $x, :args['-e', 'print q[Moin]'],
},
'-e print $something works';

#?rakudo todo 'nom regression'
is_run $x, :args['-e', "print q[\c[LATIN SMALL LETTER A WITH DOT ABOVE]]"],
{
out => "\c[LATIN SMALL LETTER A WITH DOT ABOVE]",
Expand All @@ -22,6 +23,7 @@ is_run $x, :args['-e', "print q[\c[LATIN SMALL LETTER A WITH DOT ABOVE]]"],
},
'-e print $something works with non-ASCII string literals';

#?rakudo todo 'nom regression'
is_run $x, :args['-e', 'print <1 2> »+« <1 1>'],
{
out => "23",
Expand Down
2 changes: 2 additions & 0 deletions S32-temporal/DateTime.t
Expand Up @@ -236,6 +236,7 @@ is DateTime.new('2009-12-31T22:33:44',
$t = time;
my $dt1 = DateTime.new($t);
my $dt2 = DateTime.now.utc; # $dt1 and $dt2 might differ very occasionally
#?rakudo todo 'nom regression'
is show-dt($dt1), show-dt($dt2), 'DateTime.now uses current time';

$t = time;
Expand Down Expand Up @@ -374,6 +375,7 @@ is dt(timezone => 3661).offset, 3661, 'DateTime.offset (1 hour, 1 minute, 1 seco
is ~$dt, '2004-12-31T23:57:00+0035', 'DateTime.in-timezone (year rollover)';

$dt = with-tz(dt(second => 15.5), 0, 0, 5);
#?rakudo todo 'nom regression'
is $dt.second, 20.5, 'DateTime.in-timezone (fractional seconds)';

$dt = dt(year => 2005, month => 1, day => 3,
Expand Down
3 changes: 3 additions & 0 deletions S32-temporal/local.t
Expand Up @@ -12,10 +12,13 @@ is DateTime.now.timezone, $*TZ, 'DateTime.now uses $*TZ';
is DateTime.new(year => 1995).local.timezone, $*TZ, 'DateTime.local uses $*TZ';

my $dt = ds('2003-08-01T02:22:00Z').local.utc;
#?rakudo todo 'nom regression'
is ~$dt, '2003-08-01T02:22:00Z', 'UTC -> local -> UTC (2003-08-01T02:22:00Z)';
$dt = ds('1984-02-29T05:55:22Z').local.utc;
#?rakudo todo 'nom regression'
is ~$dt, '1984-02-29T05:55:22Z', 'UTC -> local -> UTC (1984-02-29T05:55:22Z)';
$dt = ds('1998-12-31T23:59:60Z').local.utc;
#?rakudo todo 'nom regression'
is ~$dt, '1998-12-31T23:59:60Z', 'UTC -> local -> UTC (1998-12-31T23:59:60Z)';

unless '/etc/timezone'.IO ~~ :e and
Expand Down

0 comments on commit ca8ada6

Please sign in to comment.