diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-08-28 15:50:25 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-08-28 15:50:25 +0200 |
commit | 588a81dc4ce82c54464f8a5ca2e3df6536b74081 (patch) | |
tree | f766b605b942c4f845808f19541d06569d47c36a | |
parent | 3ed71293a046943c15ff05e897c0b0005e4f009a (diff) | |
download | sbotools2-588a81dc4ce82c54464f8a5ca2e3df6536b74081.tar.xz |
01-unit.t: add check_multilib() test
-rwxr-xr-x | t/01-unit.t | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/t/01-unit.t b/t/01-unit.t index 55cb403..3f7e2e5 100755 --- a/t/01-unit.t +++ b/t/01-unit.t @@ -6,12 +6,12 @@ use Test::More; use Test::Exit; use FindBin '$RealBin'; use lib "$RealBin/../SBO-Lib/lib"; -use SBO::Lib qw/ script_error usage_error open_fh %config indent get_installed_packages get_sbo_location get_sbo_locations get_local_outdated_versions get_readme_contents user_prompt /; +use SBO::Lib qw/ check_multilib script_error usage_error open_fh %config indent get_installed_packages get_sbo_location get_sbo_locations get_local_outdated_versions get_readme_contents user_prompt /; use Capture::Tiny qw/ capture_merged /; use File::Temp 'tempdir'; use Cwd; -plan tests => 60; +plan tests => 61; # 1-2: test script_error(); { @@ -321,3 +321,14 @@ SKIP: { is (SBO::Lib::version_cmp('1.0', '1.0_foo_bar'), 0, "version_cmp(1.0, 1.0_foo_bar) returned 0"); } + +# 61: test check_multilib(); +{ + my $file = "/etc/profile.d/32dev.sh"; + + my $moved = rename $file, "$file.orig"; + + is (check_multilib(), undef, "check_multilib() returned undef when $file was missing"); + + rename "$file.orig", $file if $moved; +} |