1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
summary: Verify paths are correctly reported
details: |
This test checks that the command `snap debug paths` shows
the correct paths for the SNAPD_MOUNT, SNAPD_BIN and SNAPD_LIBEXEC
environment variables.
execute: |
SNAP_MOUNT_DIR="$(os.paths snap-mount-dir)"
LIBEXEC_DIR="$(os.paths libexec-dir)"
snap debug paths | MATCH "^SNAPD_MOUNT=${SNAP_MOUNT_DIR}$"
snap debug paths | MATCH "^SNAPD_BIN=${SNAP_MOUNT_DIR}/bin$"
snap debug paths | MATCH "^SNAPD_LIBEXEC=${LIBEXEC_DIR}/snapd$"
# double check we can eval it as shell
eval "$(snap debug paths)"
test "${SNAPD_MOUNT}" = "${SNAP_MOUNT_DIR}"
|