36 lines
654 B
Bash
Executable File
36 lines
654 B
Bash
Executable File
#!/bin/sh
|
|
|
|
srcdir=${srcdir-.}
|
|
builddir=${builddir-.}
|
|
|
|
check_error()
|
|
{
|
|
if [ "$2" != "$3" ]; then
|
|
echo "error checking $1" >&2
|
|
echo " expected: $2" >&2
|
|
echo " received: $3" >&2
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
check_string()
|
|
{
|
|
val=`${builddir}/xkey -s "$1"` &&
|
|
check_error "$1" "$2" "$val" ||
|
|
exit $?
|
|
}
|
|
|
|
check_key()
|
|
{
|
|
val=`${builddir}/xkey -k "$1"` && \
|
|
check_error "$1" "$2" "$val" || \
|
|
exit $?
|
|
}
|
|
|
|
check_string Undo 0xFF65
|
|
check_key 0x1008FF56 XF86Close
|
|
check_string ThisKeyShouldNotExist NoSymbol
|
|
check_key 0x0 NULL
|
|
check_string XF86_Switch_VT_5 0x1008FE05
|
|
check_key 0x1008FE20 XF86_Ungrab
|