#!perl

# Copyright (C) 2006-2007, The Perl Foundation.
# $Id: /mirror/trunk/languages/punie/t/cmd_elsif.t 21248 2007-09-13T06:32:58.150525Z paultcochrane  $

use strict;
use warnings;
use lib qw(t . lib ../lib ../../lib ../../../lib);
use Parrot::Test tests => 1;
use Test::More;

TODO: {
    local $TODO = 'unimplemented feature';

    language_output_is( 'punie', <<'EOC', <<'OUT', 'cmd.elsif' );
#!./perl

# $Header: cmd.elsif,v 1.0 87/12/18 13:12:02 root Exp $

sub foo {
    if ($_[0] == 1) {
	1;
    }
    elsif ($_[0] == 2) {
	2;
    }
    elsif ($_[0] == 3) {
	3;
    }
    else {
	4;
    }
}

print "1..4\n";

if (($x = do foo(1)) == 1) {print "ok 1\n";} else {print "not ok 1\n";}
if (($x = do foo(2)) == 2) {print "ok 2\n";} else {print "not ok 2\n";}
if (($x = do foo(3)) == 3) {print "ok 3\n";} else {print "not ok 3\n";}
if (($x = do foo(4)) == 4) {print "ok 4\n";} else {print "not ok 4\n";}

EOC
1..4
ok 1
ok 2
ok 3
ok 4
OUT

}

# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
