From 535e0ac2df5fc5dc7284027e99ac6231fd4b2ce1 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Sun, 9 Aug 2015 22:11:45 +0200 Subject: Run test files from test directory --- test.pl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test.pl') diff --git a/test.pl b/test.pl index 959d83f..32b1b51 100755 --- a/test.pl +++ b/test.pl @@ -8,6 +8,7 @@ use constant false => 0; use File::Temp qw(tempfile tempdir tmpnam); use IPC::Open3 qw(open3); use Symbol qw(gensym); +use TAP::Harness; use Test::More; my $tests = 25; @@ -30,6 +31,12 @@ my $write_to_tmpfile = sub return $tmpfile; }; +{ + my @tests = glob('t/*.t'); + my $harness = TAP::Harness->new; + $harness->runtests(@tests); +} + plan tests => $tests; SKIP: { -- cgit v1.2.3 From c4009516f582e1a595e57d07b062b9339a3f215c Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Mon, 17 Aug 2015 20:17:03 +0200 Subject: Switch from TAP::Harness to Test::Harness in order to increase portability. --- test.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test.pl') diff --git a/test.pl b/test.pl index 32b1b51..9b0a64f 100755 --- a/test.pl +++ b/test.pl @@ -8,7 +8,7 @@ use constant false => 0; use File::Temp qw(tempfile tempdir tmpnam); use IPC::Open3 qw(open3); use Symbol qw(gensym); -use TAP::Harness; +use Test::Harness qw(runtests); use Test::More; my $tests = 25; @@ -32,9 +32,8 @@ my $write_to_tmpfile = sub }; { - my @tests = glob('t/*.t'); - my $harness = TAP::Harness->new; - $harness->runtests(@tests); + my @test_files = glob('t/*.t'); + runtests(@test_files); } plan tests => $tests; -- cgit v1.2.3 From 51dda1be52cbc5a79a16cdada24fd92c8696dfa0 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Sun, 23 Aug 2015 21:39:01 +0200 Subject: Amend test name and comment --- test.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test.pl') diff --git a/test.pl b/test.pl index 9b0a64f..30c1fd1 100755 --- a/test.pl +++ b/test.pl @@ -145,9 +145,9 @@ SKIP: { my $switch = "--$type"; - # Check that line chunks are merged when cleaning text + # Check that line chunks are printed when cleaning text without sequences my $short_text = 'Linux dev 2.6.32-5-openvz-686 #1 SMP Sun Sep 23 11:40:07 UTC 2012 i686 GNU/Linux'; - is(qx(echo -n "$short_text" | $program_buf $switch), $short_text, "merge ${\length $short_text} bytes (BUF_SIZE=$BUF_SIZE{short}, $type)"); + is(qx(echo -n "$short_text" | $program_buf $switch), $short_text, "print ${\length $short_text} bytes (BUF_SIZE=$BUF_SIZE{short}, $type)"); }; SKIP: { -- cgit v1.2.3