summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/basic1.test3
-rw-r--r--test/basic2.test3
-rw-r--r--test/basic3.test3
-rw-r--r--test/basic4.test3
-rw-r--r--test/basic5.test3
-rw-r--r--test/basic6.test3
-rw-r--r--test/basic7.test3
-rw-r--r--test/complicated1.test3
-rw-r--r--test/complicated2.test3
-rw-r--r--test/complicated3.test3
-rw-r--r--test/complicated4.test3
-rw-r--r--test/error1.expect4
-rw-r--r--test/error1.test2
-rw-r--r--test/error2.expect5
-rw-r--r--test/error2.test2
-rw-r--r--test/error3.expect3
-rw-r--r--test/error3.test2
-rw-r--r--test/error4.expect2
-rw-r--r--test/error4.test2
-rw-r--r--test/error5.expect4
-rw-r--r--test/error5.test2
-rwxr-xr-xtest/solver.sh8
22 files changed, 56 insertions, 13 deletions
diff --git a/test/basic1.test b/test/basic1.test
index f0dffab..b3a4bb7 100644
--- a/test/basic1.test
+++ b/test/basic1.test
@@ -1 +1,2 @@
---raw-repository basic.repo a
+--raw-repository basic.repo
+a
diff --git a/test/basic2.test b/test/basic2.test
index 561380e..75b172c 100644
--- a/test/basic2.test
+++ b/test/basic2.test
@@ -1 +1,2 @@
---raw-repository basic.repo --installed basic.installed a
+--raw-repository basic.repo --installed basic.installed
+a
diff --git a/test/basic3.test b/test/basic3.test
index 7f4efa7..0a790a4 100644
--- a/test/basic3.test
+++ b/test/basic3.test
@@ -1 +1,2 @@
---raw-repository basic.repo --installed basic.installed -u a
+--raw-repository basic.repo --installed basic.installed -u
+a
diff --git a/test/basic4.test b/test/basic4.test
index e2b897c..b12d9cf 100644
--- a/test/basic4.test
+++ b/test/basic4.test
@@ -1 +1,2 @@
---raw-repository basic.repo --installed basic.installed b
+--raw-repository basic.repo --installed basic.installed
+b
diff --git a/test/basic5.test b/test/basic5.test
index 6e69db3..40bf72a 100644
--- a/test/basic5.test
+++ b/test/basic5.test
@@ -1 +1,2 @@
---raw-repository basic.repo --installed basic.installed2 -a a
+--raw-repository basic.repo --installed basic.installed2 -a
+a
diff --git a/test/basic6.test b/test/basic6.test
index 2a644c2..d9fbe64 100644
--- a/test/basic6.test
+++ b/test/basic6.test
@@ -1 +1,2 @@
---raw-repository basic.repo --installed basic.installed2 a
+--raw-repository basic.repo --installed basic.installed2
+a
diff --git a/test/basic7.test b/test/basic7.test
index bd30545..c53d2d2 100644
--- a/test/basic7.test
+++ b/test/basic7.test
@@ -1 +1,2 @@
---no-network --raw-repository basic.repo --installed basic.installed -u a
+--no-network --raw-repository basic.repo --installed basic.installed -u
+a
diff --git a/test/complicated1.test b/test/complicated1.test
index 8e98c78..070f2e1 100644
--- a/test/complicated1.test
+++ b/test/complicated1.test
@@ -1 +1,2 @@
---raw-repository complicated1.repo a
+--raw-repository complicated1.repo
+a
diff --git a/test/complicated2.test b/test/complicated2.test
index d70cf8f..e2d0ef3 100644
--- a/test/complicated2.test
+++ b/test/complicated2.test
@@ -1 +1,2 @@
---raw-repository complicated1.repo b
+--raw-repository complicated1.repo
+b
diff --git a/test/complicated3.test b/test/complicated3.test
index fa75522..2ddba5b 100644
--- a/test/complicated3.test
+++ b/test/complicated3.test
@@ -1 +1,2 @@
---raw-repository complicated1.repo c
+--raw-repository complicated1.repo
+c
diff --git a/test/complicated4.test b/test/complicated4.test
index 2b636ec..dafeaad 100644
--- a/test/complicated4.test
+++ b/test/complicated4.test
@@ -1 +1,2 @@
---raw-repository complicated1.repo --installed complicated1.installed a
+--raw-repository complicated1.repo --installed complicated1.installed
+a
diff --git a/test/error1.expect b/test/error1.expect
new file mode 100644
index 0000000..d481e43
--- /dev/null
+++ b/test/error1.expect
@@ -0,0 +1,4 @@
+3 unsatisfiable dependencies (solution with 3 names)
+world: d>1.5
+b-1: d<2.0
+c-1: d>1.0
diff --git a/test/error1.test b/test/error1.test
new file mode 100644
index 0000000..7925b24
--- /dev/null
+++ b/test/error1.test
@@ -0,0 +1,2 @@
+--raw-repository complicated1.repo
+a d>1.5
diff --git a/test/error2.expect b/test/error2.expect
new file mode 100644
index 0000000..e4e6ffe
--- /dev/null
+++ b/test/error2.expect
@@ -0,0 +1,5 @@
+4 unsatisfiable dependencies (solution with 3 names)
+world: d<1.5
+a-3: d>1.5
+b-1: d<2.0
+c-1: d>1.0
diff --git a/test/error2.test b/test/error2.test
new file mode 100644
index 0000000..c0b344a
--- /dev/null
+++ b/test/error2.test
@@ -0,0 +1,2 @@
+--raw-repository complicated1.repo
+a d<1.5
diff --git a/test/error3.expect b/test/error3.expect
new file mode 100644
index 0000000..eefc650
--- /dev/null
+++ b/test/error3.expect
@@ -0,0 +1,3 @@
+1 unsatisfiable dependencies (solution with 3 names)
+world: !b
+a-3: b
diff --git a/test/error3.test b/test/error3.test
new file mode 100644
index 0000000..0d5f97a
--- /dev/null
+++ b/test/error3.test
@@ -0,0 +1,2 @@
+--raw-repository complicated1.repo
+a !b
diff --git a/test/error4.expect b/test/error4.expect
new file mode 100644
index 0000000..a422aaa
--- /dev/null
+++ b/test/error4.expect
@@ -0,0 +1,2 @@
+1 unsatisfiable dependencies (solution with 4 names)
+world: nonexistant
diff --git a/test/error4.test b/test/error4.test
new file mode 100644
index 0000000..b26d13f
--- /dev/null
+++ b/test/error4.test
@@ -0,0 +1,2 @@
+--raw-repository complicated1.repo
+a nonexistant
diff --git a/test/error5.expect b/test/error5.expect
new file mode 100644
index 0000000..e98107c
--- /dev/null
+++ b/test/error5.expect
@@ -0,0 +1,4 @@
+3 unsatisfiable dependencies (solution with 3 names)
+a-3: d>1.5
+b-1: d<2.0
+c-1: d>1.0
diff --git a/test/error5.test b/test/error5.test
new file mode 100644
index 0000000..6c9371e
--- /dev/null
+++ b/test/error5.test
@@ -0,0 +1,2 @@
+--raw-repository complicated1.repo
+a>2
diff --git a/test/solver.sh b/test/solver.sh
index d819c70..20dc232 100755
--- a/test/solver.sh
+++ b/test/solver.sh
@@ -5,8 +5,12 @@ APK_TEST=../src/apk_test
fail=0
for test in *.test; do
bn=$(basename $test .test)
- $APK_TEST $(cat $test) &> $bn.got
- if ! cmp $bn.expect $bn.got 2> /dev/null; then
+ (
+ read options
+ read world
+ $APK_TEST $options "$world" &> $bn.got
+ ) < $bn.test
+ if ! cmp $bn.expect $bn.got &> /dev/null; then
fail=$((fail+1))
echo "FAIL: $test"
diff -ru $bn.expect $bn.got