aboutsummaryrefslogtreecommitdiff
path: root/paludis/hooker_TEST.cc
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-09-10 11:17:10 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-09-10 11:17:10 +0000
commit531fb7ecbef246569cd98929a107e200089e5421 (patch)
tree566433622588c78c366468d5585f0d7a5e5684d7 /paludis/hooker_TEST.cc
parent7f30d2d58c9649051616d0691d9e68ed6c823295 (diff)
downloadpaludis-531fb7ecbef246569cd98929a107e200089e5421.tar.gz
paludis-531fb7ecbef246569cd98929a107e200089e5421.tar.xz
Check whether to enable Python Hooks in configure.ac.
Diffstat (limited to 'paludis/hooker_TEST.cc')
-rw-r--r--paludis/hooker_TEST.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/paludis/hooker_TEST.cc b/paludis/hooker_TEST.cc
index 714a2766e..432e73710 100644
--- a/paludis/hooker_TEST.cc
+++ b/paludis/hooker_TEST.cc
@@ -27,13 +27,6 @@
#include <fstream>
#include <iterator>
-#ifdef ENABLE_PYTHON
-# include <boost/version.hpp>
-# if BOOST_VERSION >= 103400
-# define PYTHON_HOOKS 1
-# endif
-#endif
-
using namespace test;
using namespace paludis;
@@ -50,7 +43,7 @@ namespace test_cases
HookResult result(0, "");
hooker.add_dir(FSEntry("hooker_TEST_dir/"), false);
-#ifdef PYTHON_HOOKS
+#ifdef ENABLE_PYTHON_HOOKS
result = hooker.perform_hook(Hook("py_hook"));
TEST_CHECK_EQUAL(result.max_exit_status, 0);
#endif
@@ -89,7 +82,7 @@ namespace test_cases
std::ifstream f(stringify(FSEntry("hooker_TEST_dir/ordering.out")).c_str());
std::string line((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
-#ifdef PYTHON_HOOKS
+#ifdef ENABLE_PYTHON_HOOKS
TEST_CHECK_EQUAL(line, "e\nc\nf\nd\nb\na\npy_hook\ng\ni\nh\nsohook\nk\nj\n");
#else
TEST_CHECK_EQUAL(line, "e\nc\nf\nd\nb\na\ng\ni\nh\nsohook\nk\nj\n");
@@ -173,7 +166,7 @@ namespace test_cases
TEST_CHECK_EQUAL(result.max_exit_status, 0);
TEST_CHECK_EQUAL(result.output, "foo");
-#ifdef PYTHON_HOOKS
+#ifdef ENABLE_PYTHON_HOOKS
result = hooker.perform_hook(Hook("py_hook_output")
.grab_output(Hook::AllowedOutputValues()("foo")));
TEST_CHECK_EQUAL(result.max_exit_status, 0);