From e2896fa82fb850841b34d624f9bd6a7b5ce9f3e9 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 11 Sep 2008 22:35:01 +0000 Subject: [PATCH] Perl's Test::Simple library is not installed by default, use Test instead. --- src/libCom/test/epicsUnitTestTest.plt | 38 +++++++++++++++------------ 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/libCom/test/epicsUnitTestTest.plt b/src/libCom/test/epicsUnitTestTest.plt index 1717ef488..9b8f3e1c9 100644 --- a/src/libCom/test/epicsUnitTestTest.plt +++ b/src/libCom/test/epicsUnitTestTest.plt @@ -1,25 +1,29 @@ #!/usr/bin/perl -use Test::Simple tests => 1; +use strict; +use Test; -$prog = "./$0"; +BEGIN {plan tests => 1} + +my $prog = "./$0"; $prog =~ s/\.t$//; -$expected = "1..11\n" . - "ok 1 - testOk(1)\n" . - "not ok 2 - testOk(0)\n" . - "ok 3 - testPass()\n" . - "not ok 4 - testFail()\n" . - "ok 5 # SKIP Skipping two\n" . - "ok 6 # SKIP Skipping two\n" . - "ok 7 - Todo pass # TODO Testing Todo\n" . - "not ok 8 - Todo fail # TODO Testing Todo\n" . - "ok 9 # SKIP Todo skip\n" . - "ok 10 - testOk1_success\n" . - "not ok 11 - testOk1_failure\n" . - "# Diagnostic\n"; +my $expected = + "1..11\n" . + "ok 1 - testOk(1)\n" . + "not ok 2 - testOk(0)\n" . + "ok 3 - testPass()\n" . + "not ok 4 - testFail()\n" . + "ok 5 # SKIP Skipping two\n" . + "ok 6 # SKIP Skipping two\n" . + "ok 7 - Todo pass # TODO Testing Todo\n" . + "not ok 8 - Todo fail # TODO Testing Todo\n" . + "ok 9 # SKIP Todo skip\n" . + "ok 10 - testOk1_success\n" . + "not ok 11 - testOk1_failure\n" . + "# Diagnostic\n"; $ENV{HARNESS_ACTIVE} = 1; -$result = `$prog`; +my $result = `$prog`; -ok($result eq $expected, 'test output matches'); +ok($result, $expected); # test output matches