summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-12-13 00:44:17 +0100
committerGravatar Nikias Bassen2013-12-13 00:44:17 +0100
commita798afc8b5b00a43f4b121168e0419df2d398338 (patch)
treec178d7a149028944254511d03f91266ca43cfcbd /test
parent3b7647499474619b3e24bf01105b6b037887a0ed (diff)
downloadlibplist-a798afc8b5b00a43f4b121168e0419df2d398338.tar.gz
libplist-a798afc8b5b00a43f4b121168e0419df2d398338.tar.bz2
change build system to autotools
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt29
-rw-r--r--test/Makefile.am25
-rwxr-xr-xtest/bigarray.test12
-rwxr-xr-xtest/bigarraycmp.test12
-rwxr-xr-xtest/empty.test12
-rwxr-xr-xtest/emptycmp.test12
-rwxr-xr-xtest/huge.test12
-rwxr-xr-xtest/hugecmp.test12
-rwxr-xr-xtest/large.test12
-rwxr-xr-xtest/largecmp.test12
-rwxr-xr-xtest/medium.test12
-rwxr-xr-xtest/mediumcmp.test12
-rwxr-xr-xtest/small.test12
-rwxr-xr-xtest/smallcmp.test12
14 files changed, 169 insertions, 29 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
deleted file mode 100644
index 1b3d2f7..0000000
--- a/test/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#build the test executable
-INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/libcnary/include )
-
-SET(plist_test_SRC
- plist_test.c)
-SET(plist_cmp_SRC
- plist_cmp.c)
-ADD_EXECUTABLE(plist_test ${plist_test_SRC})
-TARGET_LINK_LIBRARIES(plist_test plist)
-ADD_EXECUTABLE(plist_cmp ${plist_cmp_SRC})
-TARGET_LINK_LIBRARIES(plist_cmp plist)
-
-INCLUDE(CTest)
-
-SET(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-ADD_TEST(Empty plist_test ${TEST_DATA_DIR}/data/1.plist)
-ADD_TEST(Small plist_test ${TEST_DATA_DIR}/data/2.plist)
-ADD_TEST(Medium plist_test ${TEST_DATA_DIR}/data/3.plist)
-ADD_TEST(Large plist_test ${TEST_DATA_DIR}/data/4.plist)
-ADD_TEST(Huge plist_test ${TEST_DATA_DIR}/data/5.plist)
-ADD_TEST(Big_Array plist_test ${TEST_DATA_DIR}/data/6.plist)
-
-ADD_TEST(EmptyCmp plist_cmp ${TEST_DATA_DIR}/data/1.plist ${TEST_DATA_DIR}/data/1.plist.out)
-ADD_TEST(SmallCmp plist_cmp ${TEST_DATA_DIR}/data/2.plist ${TEST_DATA_DIR}/data/2.plist.out)
-ADD_TEST(MediumCmp plist_cmp ${TEST_DATA_DIR}/data/3.plist ${TEST_DATA_DIR}/data/3.plist.out)
-ADD_TEST(LargeCmp plist_cmp ${TEST_DATA_DIR}/data/4.plist ${TEST_DATA_DIR}/data/4.plist.out)
-ADD_TEST(HugeCmp plist_cmp ${TEST_DATA_DIR}/data/5.plist ${TEST_DATA_DIR}/data/5.plist.out)
-ADD_TEST(Big_ArrayCmp plist_cmp ${TEST_DATA_DIR}/data/6.plist ${TEST_DATA_DIR}/data/6.plist.out)
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..837c1dd
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,25 @@
+AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/libcnary/include
+AM_LDFLAGS =
+
+noinst_PROGRAMS = plist_cmp plist_test
+
+plist_cmp_SOURCES = plist_cmp.c
+plist_cmp_LDADD = ../src/libplist.la
+
+plist_test_SOURCES = plist_test.c
+plist_test_LDADD = ../src/libplist.la
+
+TESTS = \
+ empty.test \
+ small.test \
+ medium.test \
+ large.test \
+ huge.test \
+ bigarray.test \
+ emptycmp.test \
+ smallcmp.test \
+ mediumcmp.test \
+ largecmp.test \
+ hugecmp.test \
+ bigarraycmp.test
+
diff --git a/test/bigarray.test b/test/bigarray.test
new file mode 100755
index 0000000..fa27e69
--- /dev/null
+++ b/test/bigarray.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_test $srcdir/data/6.plist
+
diff --git a/test/bigarraycmp.test b/test/bigarraycmp.test
new file mode 100755
index 0000000..f95266e
--- /dev/null
+++ b/test/bigarraycmp.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_cmp $srcdir/data/6.plist $srcdir/data/6.plist.out
+
diff --git a/test/empty.test b/test/empty.test
new file mode 100755
index 0000000..2a036a3
--- /dev/null
+++ b/test/empty.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_test $srcdir/data/1.plist
+
diff --git a/test/emptycmp.test b/test/emptycmp.test
new file mode 100755
index 0000000..9fcd685
--- /dev/null
+++ b/test/emptycmp.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_cmp $srcdir/data/1.plist $srcdir/data/1.plist.out
+
diff --git a/test/huge.test b/test/huge.test
new file mode 100755
index 0000000..a079d38
--- /dev/null
+++ b/test/huge.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_test $srcdir/data/5.plist
+
diff --git a/test/hugecmp.test b/test/hugecmp.test
new file mode 100755
index 0000000..618966d
--- /dev/null
+++ b/test/hugecmp.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_cmp $srcdir/data/5.plist $srcdir/data/5.plist.out
+
diff --git a/test/large.test b/test/large.test
new file mode 100755
index 0000000..8034019
--- /dev/null
+++ b/test/large.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_test $srcdir/data/4.plist
+
diff --git a/test/largecmp.test b/test/largecmp.test
new file mode 100755
index 0000000..87a7e64
--- /dev/null
+++ b/test/largecmp.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_cmp $srcdir/data/4.plist $srcdir/data/4.plist.out
+
diff --git a/test/medium.test b/test/medium.test
new file mode 100755
index 0000000..231bb80
--- /dev/null
+++ b/test/medium.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_test $srcdir/data/3.plist
+
diff --git a/test/mediumcmp.test b/test/mediumcmp.test
new file mode 100755
index 0000000..33802ef
--- /dev/null
+++ b/test/mediumcmp.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_cmp $srcdir/data/3.plist $srcdir/data/3.plist.out
+
diff --git a/test/small.test b/test/small.test
new file mode 100755
index 0000000..544f374
--- /dev/null
+++ b/test/small.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_test $srcdir/data/2.plist
+
diff --git a/test/smallcmp.test b/test/smallcmp.test
new file mode 100755
index 0000000..fb10787
--- /dev/null
+++ b/test/smallcmp.test
@@ -0,0 +1,12 @@
+## -*- sh -*-
+
+# Common definitions
+if test -z "$srcdir"; then
+ srcdir=echo "$0" | sed 's,[^/]*$,,'
+ test "$srcdir" = "$0" && srcdir=.
+ test -z "$srcdir" && srcdir=.
+ test "${VERBOSE+set}" != set && VERBOSE=1
+fi
+
+$srcdir/plist_cmp $srcdir/data/2.plist $srcdir/data/2.plist.out
+