tests: Add tests for list/info commands

tingping/wmclass
Alexander Larsson 2016-05-02 12:38:12 +02:00
parent e5fad0714e
commit a68e3bba50
2 changed files with 13 additions and 3 deletions

View File

@ -146,12 +146,12 @@ assert_file_empty() {
setup_repo () {
. $(dirname $0)/make-test-runtime.sh > /dev/null
. $(dirname $0)/make-test-app.sh > /dev/null
xdg-app remote-add --user --no-gpg-verify repo repo
xdg-app remote-add --user --no-gpg-verify test-repo repo
}
install_repo () {
${XDG_APP} --user install repo org.test.Platform master
${XDG_APP} --user install repo org.test.Hello master
${XDG_APP} --user install test-repo org.test.Platform master
${XDG_APP} --user install test-repo org.test.Hello master
}
run () {

View File

@ -33,6 +33,7 @@ assert_has_symlink $USERDIR/app/org.test.Hello/current
assert_symlink_has_content $USERDIR/app/org.test.Hello/current ^$ARCH/master$
assert_has_dir $USERDIR/app/org.test.Hello/$ARCH/master
assert_has_symlink $USERDIR/app/org.test.Hello/$ARCH/master/active
ID=`readlink $USERDIR/app/org.test.Hello/$ARCH/master/active`
assert_has_file $USERDIR/app/org.test.Hello/$ARCH/master/active/deploy
assert_has_file $USERDIR/app/org.test.Hello/$ARCH/master/active/metadata
assert_has_dir $USERDIR/app/org.test.Hello/$ARCH/master/active/files
@ -48,6 +49,15 @@ assert_file_has_content $USERDIR/exports/share/applications/mimeinfo.cache x-tes
assert_has_file $USERDIR/exports/share/icons/hicolor/icon-theme.cache
assert_has_file $USERDIR/exports/share/icons/hicolor/index.theme
$XDG_APP list --user | grep org.test.Hello
$XDG_APP list --user -d | grep org.test.Hello | grep test-repo
$XDG_APP list --user -d | grep org.test.Hello | grep current
$XDG_APP list --user -d | grep org.test.Hello | grep ${ID:0:12}
$XDG_APP info --user org.test.Hello
$XDG_APP info --user org.test.Hello | grep test-repo
$XDG_APP info --user org.test.Hello | grep $ID
echo "ok install"
run org.test.Hello > hello_out