aboutsummaryrefslogtreecommitdiffstats
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 f0dffab2e3..b3a4bb7c88 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 561380ed02..75b172c134 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 7f4efa77b7..0a790a47d1 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 e2b897cc8f..b12d9cfdb9 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 6e69db3ea6..40bf72ab96 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 2a644c20a0..d9fbe64d1c 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 bd305455bb..c53d2d2f07 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 8e98c7881c..070f2e17fc 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 d70cf8f7a5..e2d0ef3a4c 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 fa75522cc0..2ddba5b2c2 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 2b636ece8d..dafeaad171 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 0000000000..d481e43dd9
--- /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 0000000000..7925b246a8
--- /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 0000000000..e4e6ffecbb
--- /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 0000000000..c0b344aa4a
--- /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 0000000000..eefc6502f4
--- /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 0000000000..0d5f97a00c
--- /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 0000000000..a422aaa783
--- /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 0000000000..b26d13f065
--- /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 0000000000..e98107c833
--- /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 0000000000..6c9371ee74
--- /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 d819c70746..20dc23202e 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