aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-27 00:02:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-01-27 00:02:50 +0000
commitc8f9c9d27702d2f40a84210a0cb31edd19489d4a (patch)
tree710fb5d7cbdb934df2b20d5164b798ec607e6976
parenta3bc51b78ba5be6ac9a7807a06d3378fd0abdb3e (diff)
downloadpaludis-c8f9c9d27702d2f40a84210a0cb31edd19489d4a.tar.gz
paludis-c8f9c9d27702d2f40a84210a0cb31edd19489d4a.tar.xz
Redirected echoes are not redundant. Fixes: ticket:57
-rw-r--r--paludis/qa/defaults_check.cc4
-rw-r--r--paludis/qa/defaults_check_TEST.cc11
-rwxr-xr-xpaludis/qa/defaults_check_TEST_setup.sh8
3 files changed, 20 insertions, 3 deletions
diff --git a/paludis/qa/defaults_check.cc b/paludis/qa/defaults_check.cc
index 052301c..d9c598f 100644
--- a/paludis/qa/defaults_check.cc
+++ b/paludis/qa/defaults_check.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -44,7 +44,7 @@ DefaultsCheck::operator() (const FSEntry & f) const
{
CheckResult result(f, identifier());
- static pcrepp::Pcre::Pcre r_echo("^\\s*(echo|einfo|ewarn)");
+ static pcrepp::Pcre::Pcre r_echo("^\\s*(echo|einfo|ewarn)[^|<>]*$");
static pcrepp::Pcre::Pcre r_colon("^\\s*:");
static pcrepp::Pcre::Pcre r_true("^\\s*true");
static pcrepp::Pcre::Pcre r_comment("^\\s*#");
diff --git a/paludis/qa/defaults_check_TEST.cc b/paludis/qa/defaults_check_TEST.cc
index c220889..80e7561 100644
--- a/paludis/qa/defaults_check_TEST.cc
+++ b/paludis/qa/defaults_check_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -53,6 +53,15 @@ namespace test_cases
TestMessageSuffix suffix("r2=" + r2.item() + ": " + join(r2.begin(), r2.end(), "; "), false);
TEST_CHECK(! r2.empty());
}
+
+ FSEntry f3(FSEntry::cwd() / "defaults_check_TEST_dir/repo1/cat-one/pkg-one/pkg-one-3.ebuild");
+ TEST_CHECK(f3.is_regular_file());
+ CheckResult r3((*(*FileCheckMaker::get_instance()->find_maker(
+ DefaultsCheck::identifier()))())(f3));
+ {
+ TestMessageSuffix suffix("r3=" + r2.item() + ": " + join(r3.begin(), r3.end(), "; "), false);
+ TEST_CHECK(r3.empty());
+ }
}
} qa_environment_defaults_check_src_unpack_test;
}
diff --git a/paludis/qa/defaults_check_TEST_setup.sh b/paludis/qa/defaults_check_TEST_setup.sh
index 98d7cb9..0bfd52c 100755
--- a/paludis/qa/defaults_check_TEST_setup.sh
+++ b/paludis/qa/defaults_check_TEST_setup.sh
@@ -37,6 +37,14 @@ src_unpack() {
:
}
END
+cat <<"END" > cat-one/pkg-one/pkg-one-3.ebuild
+DESCRIPTION="foo"
+SLOT="foo"
+
+src_unpack() {
+ echo "blah" > foo
+}
+END
cd ..