X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Flexer%2Fcommand-name-test.c;h=59a00f1ea44c8b795b3c0adff8b93c7fc1309a5b;hb=bb7605897eddfc1a416aa5cb2b6a3de13ee624de;hp=d63b8a20abca85ca303292a627bb9a4634a5234a;hpb=5a6b751888278c8c849ab0f4adf99f1be610e610;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");