test/harness/testcaseinput.c
changeset 35 51a0beae92f6
parent 9 6a13fe0fc19e
child 101 f44c530f80da
     1.1 --- a/test/harness/testcaseinput.c	Mon Jan 30 00:36:31 2012 +0000
     1.2 +++ b/test/harness/testcaseinput.c	Mon Feb 20 08:13:47 2012 +0000
     1.3 @@ -32,12 +32,14 @@
     1.4  }
     1.5  
     1.6  /*
     1.7 - * Replace \n with \r\n and U+240A (visible symbol for LF) with \n
     1.8 + * Replace \n with \r\n, U+240A (visible symbol for LF) with \n
     1.9 + * and U+240D (visible symbol for CR) with \r.
    1.10   */
    1.11  static char *unix2dos(const char *text)
    1.12  {
    1.13      gunichar c;
    1.14      const gunichar visible_lf=0x240A;
    1.15 +    const gunichar visible_cr=0x240D;
    1.16      GString *string;
    1.17      string=g_string_new(NULL);
    1.18      while(*text)
    1.19 @@ -48,6 +50,8 @@
    1.20  	    g_string_append(string,"\r\n");
    1.21  	else if (c==visible_lf)
    1.22  	    g_string_append_c(string,'\n');
    1.23 +	else if (c==visible_cr)
    1.24 +	    g_string_append_c(string,'\r');
    1.25  	else
    1.26  	    g_string_append_unichar(string,c);
    1.27      }