check_PROGRAMS = xkey rulescomp
TESTS = xkey.sh rulescomp.sh
+clean-local:
+ rm -f *.log
+
xkey_SOURCES = xkey.c
xkey_LDADD = $(top_builddir)/src/libxkbcommon.la
srcdir=${srcdir-.}
builddir=${builddir-.}
+log="$builddir/rulescomp.log"
+
compile()
{
- ${builddir}/rulescomp "$1" "$2" "$3" "$4" "$5" || exit $?
+ echo "${builddir}/rulescomp '$1' '$2' '$3' '$4' '$5'" >>"$log"
+ ${builddir}/rulescomp "$1" "$2" "$3" "$4" "$5" >>"$log" 2>&1 || exit $?
+}
+
+failcompile()
+{
+ echo "${builddir}/rulescomp '$1' '$2' '$3' '$4' '$5'" >>"$log"
+ if ${builddir}/rulescomp "$1" "$2" "$3" "$4" "$5" >>"$log" 2>&1; then
+ exit 1
+ fi
}
+rm -f "$log"
+
compile base pc105 us "" ""
+compile base "" us "" ""
compile evdev pc105 us intl ""
compile evdev pc105 us intl grp:alts_toggle
+
+failcompile "" "" "" "" "" ""
+failcompile base "" "" "" "" ""
+failcompile base pc105 "" "" "" ""
+failcompile badrules "" us "" "" ""
srcdir=${srcdir-.}
builddir=${builddir-.}
+log="$builddir/xkey.log"
+
check_error()
{
if [ "$2" != "$3" ]; then
check_string()
{
+ echo "${builddir}/xkey -s '$1'" >>"$log"
val=`${builddir}/xkey -s "$1"` &&
- check_error "$1" "$2" "$val" ||
+ echo "$val" >>"$log" &&
+ check_error "$1" "$2" "$val" >>"$log" 2>&1 ||
exit $?
}
check_key()
{
+ echo "${builddir}/xkey -k '$1'" >>"$log"
val=`${builddir}/xkey -k "$1"` && \
- check_error "$1" "$2" "$val" || \
+ echo "$val" >>"$log" &&
+ check_error "$1" "$2" "$val" >>"$log" 2>&1 || \
exit $?
}
+rm -f "$log"
+
check_string Undo 0xFF65
check_key 0x1008FF56 XF86Close
check_string ThisKeyShouldNotExist NoSymbol