5 pipp/t/control_flow.t - tests for Pipp
18 use lib "$FindBin::Bin/../../lib";
20 use Parrot::Config ();
22 use Test::More tests => 10;
24 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'if, one statement in block' );
35 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'if, no statements in block' );
46 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'if, two statements in block' );
58 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'if/else taking if-branch' );
73 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'i/else taking else-branchf' );
88 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED' . q{ }, 'positive int' );
100 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'zero' );
104 'Condition is true' does not apply.
113 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'string' );
117 The string 'false' is true.
122 The string 'false' is true.
125 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'string' );
129 The string 'vrai' is true.
135 The string 'vrai' is false.
140 The string 'vrai' is true.
144 language_output_is( 'Pipp', <<'END_CODE', <<'END_EXPECTED', 'string' );
148 The integer 0 is true.
154 The integer 0 is false.
159 The integer 0 is false.