]> granicus.if.org Git - re2c/commitdiff
run_tests.sh: fix the order of files in test results.
authorUlya Trofimovich <skvadrik@gmail.com>
Sun, 22 Nov 2015 20:55:04 +0000 (20:55 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Sun, 22 Nov 2015 20:55:04 +0000 (20:55 +0000)
'sort' behavior depends on current locale; set 'LC_ALL=C LANG=C'
before doing locale-sensitive things. Updated test results.

re2c/run_tests.sh.in
re2c/test/condition_05.cgitcondition_05.cgit.h.c
re2c/test/condition_05.cgtcondition_05.cgt.h.c

index b0740451c63abd8ea7eb178dec5fe29a2013366f..9d65ff9530128371e5b6ae7ae3efe6dc0c9a3928 100644 (file)
@@ -20,6 +20,10 @@ detect_cpu_count () {
     fi
 }
 
+lc_run() {
+    LANG=C LC_ALL=C "$@"
+}
+
 valgrind=""
 skeleton=0
 keep_tmp_files=0
@@ -118,7 +122,7 @@ run_pack() {
                # filename (dot short* (long arg?)*)? ext
                # must keep to POSIX standard: no syntactic sugar like +,?, etc.
                # if you change this regexp, try it with 'sed --posix'
-               local switches=`basename "$x" | LC_ALL=C sed \
+               local switches=`basename "$x" | lc_run sed \
                        -e 's/^[^.]*\.re$//g' \
                        -e 's/^[^.]*\.\(.*\)\.re$/\1/g' \
                        -e 's/^\([^-]\)/-\1/' \
@@ -157,9 +161,9 @@ run_pack() {
                        $valgrind $wine ../../$re2c $switches "$outx" 2>"$outc.stderr" 1>&2
                        # paste all files dropped by re2c into output file
                        rm "$outx" && find . -type f \
-                               | sort \
+                               | lc_run sort \
                                | xargs cat \
-                               | LC_ALL=C sed -e 's,/\* Generated by re2c .*\*/,/\* Generated by re2c \*/,g' \
+                               | lc_run sed -e 's,/\* Generated by re2c .*\*/,/\* Generated by re2c \*/,g' \
                                >> "../$outc"
                        # cleanup sandbox
                        cd .. \
index 6a7bde3f92bd0863a18ab2337d2ebfa3c9609d16..2d3ca1801278ab4af8562e4240b97e5ec01f7c57 100644 (file)
@@ -1,4 +1,10 @@
 /* Generated by re2c */
+
+enum YYCONDTYPE {
+       yycnormal,
+       yyccomment,
+};
+/* Generated by re2c */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -136,9 +142,3 @@ int main(int argc, char **argv)
        }
        return 0;
 }
-/* Generated by re2c */
-
-enum YYCONDTYPE {
-       yycnormal,
-       yyccomment,
-};
index 814419126501ac035dc60620189352258bbec604..f6a4e1bbb10e7f498c79ce3e805cde45b46aab8c 100644 (file)
@@ -1,4 +1,11 @@
 /* Generated by re2c */
+#line 3 "condition_05.cgt.h"
+
+enum YYCONDTYPE {
+       yycnormal,
+       yyccomment,
+};
+/* Generated by re2c */
 #line 1 "condition_05.cgtcondition_05.cgt.h.re"
 #include <stdio.h>
 #include <stdlib.h>
@@ -147,10 +154,3 @@ int main(int argc, char **argv)
        }
        return 0;
 }
-/* Generated by re2c */
-#line 3 "condition_05.cgt.h"
-
-enum YYCONDTYPE {
-       yycnormal,
-       yyccomment,
-};