about summary refs log tree commit diff
path: root/localedata/tests-mbwc/dat_wcwidth.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-06-27 15:53:49 +0000
committerAndreas Jaeger <aj@suse.de>2000-06-27 15:53:49 +0000
commit22827fb10b7963e873025416a601c185ee6dade5 (patch)
tree430d62380f6b38d289d402fb91e6617cc0717875 /localedata/tests-mbwc/dat_wcwidth.c
parentcb6815da362a320f2bc9a2d0e0bd95ca354ff380 (diff)
downloadglibc-22827fb10b7963e873025416a601c185ee6dade5.tar.gz
glibc-22827fb10b7963e873025416a601c185ee6dade5.tar.xz
glibc-22827fb10b7963e873025416a601c185ee6dade5.zip
Add new files to tests and add environment for them.
Diffstat (limited to 'localedata/tests-mbwc/dat_wcwidth.c')
-rw-r--r--localedata/tests-mbwc/dat_wcwidth.c100
1 files changed, 100 insertions, 0 deletions
diff --git a/localedata/tests-mbwc/dat_wcwidth.c b/localedata/tests-mbwc/dat_wcwidth.c
new file mode 100644
index 0000000000..d57a3d4247
--- /dev/null
+++ b/localedata/tests-mbwc/dat_wcwidth.c
@@ -0,0 +1,100 @@
+/*
+ *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
+ *
+ *	 FILE:	dat_wcwidth.c
+ *
+ *	 WCWIDTH:  int wcwidth (wchar_t wc);
+ */
+
+TST_WCWIDTH tst_wcwidth_loc [] = {
+    {
+      { Twcwidth, TST_LOC_de },
+      {
+	{ /*inp*/ { 0x0000		     },	 /* #01 */
+	  /*exp*/ { 0,0,	1,0,	     },
+	},
+	{ /*inp*/ { 0x0020		     },	 /* #02 */
+	  /*exp*/ { 0,0,	1,1,	     },
+	},
+	{ /*inp*/ { 0x007F		     },	 /* #03 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	{ /*inp*/ { 0x0080		     },	 /* #04 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	{ /*inp*/ { 0x00A1		     },	 /* #05 */
+	  /*exp*/ { 0,0,	1,1,	     },
+	},
+	{ /*inp*/ { 0x00C1		     },	 /* #06 */
+	  /*exp*/ { 0,0,	1,1,	     },
+	},
+	/* <WAIVER> */	/* CHECK : wint_t */
+	{ /*inp*/ { 0x3041		     },	 /* #07 */
+	  /*exp*/ { 0,0,	1,0,	     },
+	},
+	{ is_last: 1 }
+      }
+    },
+    {
+      { Twcwidth, TST_LOC_enUS },
+      {
+	{ /*inp*/ { 0x0000		     },	 /* #01 */
+	  /*exp*/ { 0,0,	1,0,	     },
+	},
+	{ /*inp*/ { 0x0020		     },	 /* #02 */
+	  /*exp*/ { 0,0,	1,1,	     },
+	},
+	{ /*inp*/ { 0x007F		     },	 /* #03 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	{ /*inp*/ { 0x0080		     },	 /* #04 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	/* <WAIVER> */	/* assume ascii */
+	{ /*inp*/ { 0x00A1		     },	 /* #05 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	/* <WAIVER> */	/* assume ascii */
+	{ /*inp*/ { 0x00C1		     },	 /* #06 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	/* <WAIVER> */	/* CHECK : wint_t */
+	{ /*inp*/ { 0x3041		     },	 /* #07 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	{ is_last: 1 }
+      }
+    },
+    {
+      { Twcwidth, TST_LOC_eucJP },
+      {
+	{ /*inp*/ { 0x0000		     },	 /* #01 */
+	  /*exp*/ { 0,0,	1,0,	     },
+	},
+	{ /*inp*/ { 0x0020		     },	 /* #02 */
+	  /*exp*/ { 0,0,	1,1,	     },
+	},
+	{ /*inp*/ { 0x007F		     },	 /* #03 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	{ /*inp*/ { 0x0080		     },	 /* #04 */
+	  /*exp*/ { 0,0,	1,-1,	     },
+	},
+	/* <NO_WAIVER> */
+	{ /*inp*/ { 0x00A1		     },	 /* #05 */
+	  /*exp*/ { 0,0,	1,0,	     },
+	},
+	/* jisx0212 */
+	{ /*inp*/ { 0x00C1		     },	 /* #06 */
+	  /*exp*/ { 0,0,	1,2,	     },
+	},
+	{ /*inp*/ { 0x3041		     },	 /* #07 */
+	  /*exp*/ { 0,0,	1,2,	     },
+	},
+	{ is_last: 1 }
+      }
+    },
+    {
+      { Twcwidth, TST_LOC_end }
+    }
+};