summaryrefslogtreecommitdiff
path: root/xc/test/xsuite/xtest/tset/CH10/ismscfnctn/ismscfnctn.m
diff options
context:
space:
mode:
Diffstat (limited to 'xc/test/xsuite/xtest/tset/CH10/ismscfnctn/ismscfnctn.m')
-rw-r--r--xc/test/xsuite/xtest/tset/CH10/ismscfnctn/ismscfnctn.m94
1 files changed, 94 insertions, 0 deletions
diff --git a/xc/test/xsuite/xtest/tset/CH10/ismscfnctn/ismscfnctn.m b/xc/test/xsuite/xtest/tset/CH10/ismscfnctn/ismscfnctn.m
new file mode 100644
index 000000000..0e3598957
--- /dev/null
+++ b/xc/test/xsuite/xtest/tset/CH10/ismscfnctn/ismscfnctn.m
@@ -0,0 +1,94 @@
+/*
+ * Copyright 1990, 1991 by the Massachusetts Institute of Technology and
+ * UniSoft Group Limited.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the names of MIT and UniSoft not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. MIT and UniSoft
+ * make no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * $XConsortium$
+ */
+>>TITLE IsMiscFunctionKey CH10
+
+IsMiscFunctionKey(keysym)
+KeySym keysym;
+>>EXTERN
+#define XK_LATIN1
+#define XK_MISCELLANY
+#include "keysymdef.h"
+#undef XK_MISCELLANY
+#undef XK_LATIN1
+>>ASSERTION Good A
+When the
+.A keysym
+argument is a miscellaneous function key, then
+invocation of the xname macro returns
+.S True .
+>>STRATEGY
+For each miscellaneous function key KeySym:
+ Verify that xname returns True.
+>>CODE
+static KeySym ks[] = {
+ XK_Select,
+ XK_Print,
+ XK_Execute,
+ XK_Insert,
+ XK_Undo,
+ XK_Redo,
+ XK_Menu,
+ XK_Find,
+ XK_Cancel,
+ XK_Help,
+ XK_Break,
+ /* XK_Mode_switch, */
+ /* XK_script_switch, */
+ /* XK_Num_Lock, */
+ 0 };
+KeySym *ksp;
+Bool res;
+
+ for(ksp = ks; *ksp; ksp++) {
+ keysym = *ksp;
+ res = XCALL;
+ if(res != True) {
+ char *kstr = XKeysymToString(*ksp);
+
+ report("%s() did not return True for KeySym XK_%s (value %lu).",
+ TestName, kstr != (char *) NULL ? kstr : "<KeySym Undefined>", *ksp);
+ FAIL;
+ } else
+ CHECK;
+
+ }
+
+ CHECKPASS(NELEM(ks) - 1);
+
+>>ASSERTION Good A
+When the
+.A keysym
+argument is not a miscellaneous function key, then
+invocation of the xname macro returns
+.S False .
+>>STRATEGY
+Verify that xname returns False for the KeySym XK_A.
+>>CODE
+Bool res;
+
+ keysym = XK_A;
+ res = XCALL;
+ if(res != False) {
+ char *kstr = XKeysymToString(keysym);
+
+ report("%s() did not return False for KeySym XK_%s (value %lu).",
+ TestName, kstr != (char *) NULL ? kstr : "<KeySym Undefined>", keysym);
+ FAIL;
+ } else
+ CHECK;
+
+ CHECKPASS(1);