summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-04-01 14:29:26 +0000
committerCarl Hetherington <carl@carlh.net>2012-04-01 14:29:26 +0000
commit3240a93aad831eea5295fbca2387d2210e9e8638 (patch)
treeeb351a899406b18ebe2c101c7225a6b47bcfc0ab /libs
parentc886f761eba603a44b266ef83df6d008bd1b7c68 (diff)
Fix libpbd tests and add test for url_decode().
git-svn-id: svn://localhost/ardour2/branches/3.0@11770 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rwxr-xr-xlibs/pbd/run-tests.sh2
-rw-r--r--libs/pbd/test/convert_test.cc14
-rw-r--r--libs/pbd/test/xpath.cc2
-rw-r--r--libs/pbd/wscript1
4 files changed, 17 insertions, 2 deletions
diff --git a/libs/pbd/run-tests.sh b/libs/pbd/run-tests.sh
index b1315312bc..c20dc42adc 100755
--- a/libs/pbd/run-tests.sh
+++ b/libs/pbd/run-tests.sh
@@ -6,7 +6,7 @@ if [ ! -f './id.cc' ]; then
fi
srcdir=`pwd`
-cd ../../build/default
+cd ../../build
libs='libs'
diff --git a/libs/pbd/test/convert_test.cc b/libs/pbd/test/convert_test.cc
new file mode 100644
index 0000000000..43e6546716
--- /dev/null
+++ b/libs/pbd/test/convert_test.cc
@@ -0,0 +1,14 @@
+#include "convert_test.h"
+#include "pbd/convert.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION (ConvertTest);
+
+using namespace std;
+
+void
+ConvertTest::testUrlDecode ()
+{
+ string url = "http://foo.bar.baz/A%20B%20C%20.html";
+ PBD::url_decode (url);
+ CPPUNIT_ASSERT_EQUAL (url, string ("http://foo.bar.baz/A B C .html"));
+}
diff --git a/libs/pbd/test/xpath.cc b/libs/pbd/test/xpath.cc
index d06bf81c29..15062c6132 100644
--- a/libs/pbd/test/xpath.cc
+++ b/libs/pbd/test/xpath.cc
@@ -8,7 +8,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION (XPathTest);
using namespace std;
-static string const prefix = "../../libs/pbd/test/";
+static string const prefix = "../libs/pbd/test/";
void
XPathTest::testMisc ()
diff --git a/libs/pbd/wscript b/libs/pbd/wscript
index 8afc89ea87..b050544524 100644
--- a/libs/pbd/wscript
+++ b/libs/pbd/wscript
@@ -136,6 +136,7 @@ def build(bld):
test/xpath.cc
test/scalar_properties.cc
test/signals_test.cc
+ test/convert_test.cc
'''.split()
testobj.target = 'run-tests'
testobj.includes = obj.includes + ['test', '../pbd']