summaryrefslogtreecommitdiffstats
path: root/tests/listcodenames.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:12:14 +0000
commit4b8a0f3f3dcf60dac2ce308ea08d413a535af29f (patch)
tree0f09c0ad2a4d0f535d89040a63dc3a866a6606e6 /tests/listcodenames.test
parentInitial commit. (diff)
downloadreprepro-4b8a0f3f3dcf60dac2ce308ea08d413a535af29f.tar.xz
reprepro-4b8a0f3f3dcf60dac2ce308ea08d413a535af29f.zip
Adding upstream version 5.4.4.upstream/5.4.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/listcodenames.test')
-rw-r--r--tests/listcodenames.test41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/listcodenames.test b/tests/listcodenames.test
new file mode 100644
index 0000000..90b08a2
--- /dev/null
+++ b/tests/listcodenames.test
@@ -0,0 +1,41 @@
+set -u
+. "$TESTSDIR"/test.inc
+
+testrun - -b . _listcodenames 3<<EOF
+return 254
+stderr
+*=Error opening config file './conf/distributions': No such file or directory(2)
+-v0*=There have been errors!
+stdout
+EOF
+mkdir -p conf
+touch conf/distributions
+testrun - -b . _listcodenames 3<<EOF
+return 249
+stderr
+*=No distribution definitions found in ./conf/distributions!
+-v0*=There have been errors!
+stdout
+EOF
+cat > conf/distributions <<EOF
+Codename: foo/updates
+Suite: suitename
+Components: a bb ccc dddd
+UDebComponents: a dddd
+Architectures: x source
+EOF
+testrun - -b . _listcodenames 3<<EOF
+stderr
+stdout
+*=foo/updates
+EOF
+testrun - -b . --nothingiserror _listcodenames 3<<EOF
+stderr
+stdout
+*=foo/updates
+EOF
+dodo test ! -d db
+dodo test ! -d pool
+dodo test ! -d dists
+rm -r -f conf
+testsuccess