From 17fc63fa9d47815e7284ef8dc262e2d765fbb310 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 29 Jul 2016 00:08:29 +0200 Subject: 20-config.t: add test for sboconfig creating /etc/sbotools --- t/20-config.t | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t/20-config.t b/t/20-config.t index 622ceea..a25b1c6 100755 --- a/t/20-config.t +++ b/t/20-config.t @@ -8,7 +8,7 @@ use FindBin '$RealBin'; use lib $RealBin; use Test::Sbotools qw/ sboconfig /; -plan tests => 8; +plan tests => 9; sboconfig '-c', 'invalid', { exit => 1, expected => "You have provided an invalid parameter for -c\n" }; sboconfig '-d', 'invalid', { exit => 1, expected => "You have provided an invalid parameter for -d\n" }; @@ -19,7 +19,7 @@ sboconfig '-o', 'invalid', { exit => 1, expected => "You have provided an invali sboconfig '-V', 'invalid', { exit => 1, expected => "You have provided an invalid parameter for -V\n" }; SKIP: { - skip "Only run this test under Travis CI", 1 unless $ENV{TRAVIS}; + skip "Only run this test under Travis CI", 2 unless $ENV{TRAVIS}; my $dir = '/etc/sbotools'; system 'mv', $dir, "$dir.moved"; @@ -28,5 +28,11 @@ SKIP: { sboconfig '-V', '14.1', { exit => 1, expected => qr"\QUnable to create $dir. Exiting." }; system 'rm', $dir; + + sboconfig '-V', '14.1', { test => 0 }; + ok(-d $dir, "$dir created correctly."); + + system 'rm', "$dir/sbotools.conf"; + system 'rmdir', $dir; system 'mv', "$dir.moved", $dir; } -- cgit v1.2.3