Let args_init_from_gcc_atfile split on carriage return as well

This commit is contained in:
Joel Rosdahl 2012-08-08 18:56:56 +02:00
parent a03cb5a356
commit dc75e5407d
2 changed files with 4 additions and 1 deletions

1
args.c
View File

@ -97,6 +97,7 @@ args_init_from_gcc_atfile(const char *filename)
}
case '\n':
case '\r':
case '\t':
case ' ':
if (quoting) {

View File

@ -63,7 +63,9 @@ TEST(args_init_from_string)
TEST(args_init_from_gcc_atfile)
{
struct args *args;
const char *argtext = "first sec\\\tond\tthi\\\\rd\nfourth \tfif\\ th \"si'x\\\" th\" 'seve\nth'\\";
const char *argtext =
"first\rsec\\\tond\tthi\\\\rd\nfourth \tfif\\ th \"si'x\\\" th\""
" 'seve\nth'\\";
create_file("gcc_atfile", argtext);