Edit

kc3-lang/automake/lib/Automake/tests/Cond2.pl

Branch :

  • Show log

    Commit

  • Author : Ralf Wildenhues
    Date : 2009-10-18 12:01:46
    Hash : 8fef9e83
    Message : Coverage and fixes for Condition.pm. * lib/Automake/Condition.pm (new): Catch common programming errors better by checking type of passed argument before munging them to all be strings through split. * lib/Automake/tests/Condition.pl (test_basics): Also test ->human. (test_merge): New function, test ->merge, ->merge_conds, ->strip. * lib/Automake/tests/Condition-t.pl (test_basics, test_merge): Likewise changes, but including state copies across thread creation. * lib/Automake/tests/Cond2.pl: New test for programming error. * lib/Automake/tests/Cond3.pl: Likewise. * lib/Automake/tests/Makefile.am (TESTS, XFAIL_TESTS): Update. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

  • lib/Automake/tests/Cond2.pl
  • # Catch common programming error:
    # A Condition passed as a string to 'new'.
    use Automake::Condition;
    
    my $cond = new Automake::Condition ('TRUE');
    new Automake::Condition ($cond);