#!/bin/sh -efu

cwd="$(readlink -ev "${0%/*}")"

cd "$cwd"

rc=0
temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"

datadir="@DATADIR@/data/alt-is-meta"

./libkeymap-showmaps "$datadir"/alt-is-meta.map > "$temp" || rc=$?
cmp -s "$datadir/alt-is-meta.output" "$temp" || rc=$?

if [ "$rc" != 0 ]; then
	printf 'failed\n'
else
	rm -f -- "$temp"
fi

exit $rc
