X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Flanguage%2Flexer%2Fcommand-name-test.c;h=59a00f1ea44c8b795b3c0adff8b93c7fc1309a5b;hb=9d24b4fb4d831d7a2bebb51fd111726f0e682e45;hp=d63b8a20abca85ca303292a627bb9a4634a5234a;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/tests/language/lexer/command-name-test.c b/tests/language/lexer/command-name-test.c index d63b8a20ab..59a00f1ea4 100644 --- a/tests/language/lexer/command-name-test.c +++ b/tests/language/lexer/command-name-test.c @@ -118,6 +118,17 @@ parse_options (int argc, char **argv) } + for (int i = optind; i < argc; i++) + { + /* Replace ++ by nonbreaking space in UTF-8. */ + for (char *p = argv[i]; *p != '\0'; p++) + if (p[0] == '+' && p[1] == '+') + { + p[0] = 0xc2; + p[1] = 0xa0; + } + } + for (breakpoint = optind; ; breakpoint++) if (breakpoint >= argc) error (1, 0, "missing ',' on command line; use --help for help");