mirror of
https://github.com/flatpak/flatpak.git
synced 2026-11-01 19:40:35 -05:00
Instead of announcing ahead of time how many tests will be run, just log 1..32 or similar at the end, from the done_testing function. This should go some way towards preventing unnecessary cherry-pick conflicts when tests added to this script get backported. Resolves: https://github.com/flatpak/flatpak/issues/6793 Signed-off-by: Simon McVittie <smcv@collabora.com>
71 lines
1.7 KiB
Bash
71 lines
1.7 KiB
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
. $(dirname $0)/libtest.sh
|
|
|
|
skip_revokefs_without_fuse
|
|
|
|
INCLUDE_SPECIAL_CHARACTER=1 setup_repo
|
|
install_repo
|
|
|
|
COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Hello`
|
|
|
|
${FLATPAK} info -rcos org.test.Hello > info
|
|
|
|
assert_file_has_content info "^app/org\.test\.Hello/$(flatpak --default-arch)/master test-repo ${COMMIT}"
|
|
|
|
ok "info -rcos"
|
|
|
|
${FLATPAK} info --show-metadata org.test.Hello > info
|
|
|
|
# CVE-2023-28101
|
|
assert_file_has_content info "name=org\.test\.Hello"
|
|
assert_file_has_content info "^A=x\\\\x09y"
|
|
|
|
ok "info --show-metadata"
|
|
|
|
${FLATPAK} info --show-permissions org.test.Hello > info
|
|
|
|
assert_file_has_content info "^A=x\\\\x09y"
|
|
|
|
ok "info --show-permissions"
|
|
|
|
${FLATPAK} info --show-location org.test.Hello > info
|
|
|
|
assert_file_has_content info "app/org\.test\.Hello/$(flatpak --default-arch)/master/${COMMIT}"
|
|
|
|
ok "info --show-location"
|
|
|
|
${FLATPAK} info --show-runtime org.test.Hello > info
|
|
|
|
assert_file_has_content info "^org\.test\.Platform/$(flatpak --default-arch)/master$"
|
|
|
|
ok "info --show-runtime"
|
|
|
|
${FLATPAK} info --show-sdk org.test.Hello > info
|
|
|
|
assert_file_has_content info "^org\.test\.Platform/$(flatpak --default-arch)/master$"
|
|
|
|
ok "info --show-sdk"
|
|
|
|
${FLATPAK} info --show-extensions org.test.Hello > info
|
|
|
|
assert_file_has_content info "Extension: runtime/org\.test\.Hello\.Locale/$(flatpak --default-arch)/master$"
|
|
|
|
ok "info --show-extensions"
|
|
|
|
${FLATPAK} info --file-access=home org.test.Hello > info
|
|
|
|
assert_file_has_content info "^hidden$"
|
|
|
|
ok "info --file-access"
|
|
|
|
${FLATPAK} info org.test.Hello > info
|
|
|
|
assert_file_has_content info "^Hello world test app: org\.test\.Hello - Print a greeting$"
|
|
|
|
ok "info (name header)"
|
|
|
|
done_testing
|