X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/7824564bfde681eddf6969174bba7604d6f34848..8683da61448b62df2ccc1918e4c605c9e6d4ab1d:/test/integration/test-bug-624218-Translation-file-handling diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling index 652386892..b629dd665 100755 --- a/test/integration/test-bug-624218-Translation-file-handling +++ b/test/integration/test-bug-624218-Translation-file-handling @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture 'i386' @@ -61,48 +61,45 @@ translationslisted 'with full Index' # No Release file at all, so no records about Translation files # (fallback to guessing) find aptarchive \( -name 'Release' -o -name 'InRelease' \) -delete -configallowinsecurerepositories "true"; +echo 'Acquire::AllowInsecureRepositories "true";' > rootdir/etc/apt/apt.conf.d/allow-insecure-repositories.conf msgtest 'Download of en as forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=en -cp rootdir/tmp/testsuccess.output testsuccess.output -testsuccess grep -q -e 'Translation-en ' testsuccess.output +testsuccess grep -q -e 'Translation-en ' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of nothing else in forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=en -testfailure grep -q -e 'Translation-[^e][^n] ' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation-[^e][^n] ' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of ast_DE as forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=ast_DE -cp rootdir/tmp/testsuccess.output testsuccess.output -testsuccess grep -q -e 'Translation-ast_DE$' testsuccess.output +testsuccess grep -q -e 'Translation-ast_DE$' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of nothing else in forced language' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=ast_DE -testfailure grep -q -e 'Translation-[^a][^s]' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation-[^a][^s]' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists msgtest 'Download of nothing if none is forced' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=none -testfailure grep -q -e 'Translation' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists mkdir -p rootdir/var/lib/apt/lists -touch rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_i18n_Translation-ast_DE +touch rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-ast_DE msgtest 'Download of builtin files' 'without Index' testwarning --nomsg aptget update -cp rootdir/tmp/testsuccess.output testsuccess.output -testsuccess grep -q -e 'Translation-ast_DE' testsuccess.output +testsuccess grep -q -e 'Translation-ast_DE' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists mkdir -p rootdir/var/lib/apt/lists -touch rootdir/var/lib/apt/lists/localhost:8080_dists_unstable_main_i18n_Translation-ast_DE +touch rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-ast_DE msgtest 'Download of nothing (even builtin) if none is forced' 'without Index' testwarning --nomsg aptget update -o Acquire::Languages=none -testfailure grep -q -e 'Translation' rootdir/tmp/testsuccess.output +testfailure grep -q -e 'Translation' rootdir/tmp/testwarning.output rm -rf rootdir/var/lib/apt/lists