From d71d6d1d852863297913d898cd7fff997b27bcc5 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 11 Dec 2003 21:33:34 +0000 Subject: [PATCH] Added test for %import git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5540 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/inctest.i | 1 + Examples/test-suite/python/inctest_runme.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Examples/test-suite/inctest.i b/Examples/test-suite/inctest.i index 0b07eb345..50e15b0af 100644 --- a/Examples/test-suite/inctest.i +++ b/Examples/test-suite/inctest.i @@ -11,5 +11,6 @@ // including one. This is not right, it must include both, // as the well known compilers do. // + // Also repeats the test for the import directive in subdirectories %include "testdir/test.i" diff --git a/Examples/test-suite/python/inctest_runme.py b/Examples/test-suite/python/inctest_runme.py index 98cf9e4ff..e10f4544c 100644 --- a/Examples/test-suite/python/inctest_runme.py +++ b/Examples/test-suite/python/inctest_runme.py @@ -21,3 +21,12 @@ pass if error == 1: raise RuntimeError +# Check the import in subdirectory worked +if inctest.importtest1(5) != 15: + print "import test 1 failed" + raise RuntimeError + +if inctest.importtest2("black") != "white": + print "import test 2 failed" + raise RuntimeError +