summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-09-23 15:07:14 +0800
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2014-09-23 17:09:21 +1000
commit2b49a92ff84a8ec06ec0f97e36f0f813eaa46764 (patch)
treeac531d6882f49a054bda8682cc0768d3d650484d
parent3aef1b6d1f465596ebf7883a50efcf4d6f0ffcf4 (diff)
downloadtalos-petitboot-2b49a92ff84a8ec06ec0f97e36f0f813eaa46764.tar.gz
talos-petitboot-2b49a92ff84a8ec06ec0f97e36f0f813eaa46764.zip
tests/lib/test-fold: Add mbs test with separators
Ensure we're doing the correct thing with mbs + separators in the fold code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r--test/lib/test-fold.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/lib/test-fold.c b/test/lib/test-fold.c
index 474892d..2aee39d 100644
--- a/test/lib/test-fold.c
+++ b/test/lib/test-fold.c
@@ -88,8 +88,19 @@ struct test test_mbs = {
},
};
+struct test test_mbs_sep = {
+ .in = "從主功 能表 畫面中,選 取啟 動選項。",
+ .linelen = 15,
+ .out = {
+ "從主功 能表",
+ "畫面中,選",
+ "取啟 動選項。",
+ NULL,
+ },
+};
+
static struct test *tests[] = {
- &test_split, &test_fold_line, &test_break, &test_mbs,
+ &test_split, &test_fold_line, &test_break, &test_mbs, &test_mbs_sep,
};
static void __attribute__((noreturn)) fail(struct ctx *ctx,
OpenPOWER on IntegriCloud