[Reproducible-commits] [dpkg] 38/105: scripts/t: Use is() instead of ok() to test for undef
Niko Tyni
ntyni at moszumanska.debian.org
Mon May 2 13:49:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch ntyni/reproducible_builds
in repository dpkg.
commit b970f032e13e4296b9c0eaa91d507b30bee17f1b
Author: Guillem Jover <guillem at debian.org>
Date: Wed Mar 23 23:49:16 2016 +0100
scripts/t: Use is() instead of ok() to test for undef
---
scripts/t/Dpkg_Deps.t | 2 +-
scripts/t/Dpkg_Path.t | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/t/Dpkg_Deps.t b/scripts/t/Dpkg_Deps.t
index 0293610..326c719 100644
--- a/scripts/t/Dpkg_Deps.t
+++ b/scripts/t/Dpkg_Deps.t
@@ -197,7 +197,7 @@ my $dep_bad_arch = deps_parse('package [alpha] [amd64]');
is($dep_bad_arch, undef, 'Bogus repeated arch restriction');
my $dep_bad_multiline = deps_parse("a, foo\nbar, c");
-ok(!defined($dep_bad_multiline), 'invalid dependency split over multiple line');
+is($dep_bad_multiline, undef, 'invalid dependency split over multiple line');
delete $SIG{__WARN__};
diff --git a/scripts/t/Dpkg_Path.t b/scripts/t/Dpkg_Path.t
index bf04847..deb63ba 100644
--- a/scripts/t/Dpkg_Path.t
+++ b/scripts/t/Dpkg_Path.t
@@ -55,6 +55,6 @@ is(relative_to_pkg_root("$tmpdir/a/b/c"), 'b/c', 'relative_to_pkg_root');
chdir($tmpdir);
-ok(!defined(get_pkg_root_dir('debian/a/b/c')), 'get_pkg_root_dir undef');
-ok(!defined(relative_to_pkg_root('debian/a/b/c')), 'relative_to_pkg_root');
+is(get_pkg_root_dir('debian/a/b/c'), undef, 'get_pkg_root_dir undef');
+is(relative_to_pkg_root('debian/a/b/c'), undef, 'relative_to_pkg_root undef');
is(guess_pkg_root_dir('debian/a/b/c'), 'debian/a', 'guess_pkg_root_dir fallback');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list