From 9fad4d7ae54232c20df3ea2d874c2483aaca6c3c Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 3 Oct 2019 23:01:58 +0200 Subject: [PATCH] t: strip options from input file names Ignore everything after underscore in output files, so input files do not need to match irrelevant test options (source data can remain unchanged regardless of further test variations). --- t/regress.t | 4 ++-- t/{t1012-unmarked_--markers=.in => t1012-unmarked.in} | 0 t/{t1101-wow_much_length_-l30.in => t1101-wow_much_length.in} | 0 t/{t1102-strip_contents_-l0.in => t1102-strip_contents.in} | 0 t/{t1103-only_separators_-l1.in => t1103-only_separators.in} | 0 ...bbreviate_contents_-l5.in => t1104-abbreviate_contents.in} | 0 ...-length_percentage_-l50%.in => t1105-length_percentage.in} | 0 t/{t1106-forced_length_-l-30.in => t1106-forced_length.in} | 0 t/{t1200-unaligned_-u.in => t1200-unaligned.in} | 0 t/{t1201-unchanged_-uw1.in => t1201-unchanged.in} | 0 ...202-abbreviate_total_-ul8.in => t1202-abbreviate_total.in} | 0 t/{t1300-field_number_-f2.in => t1300-field_number.in} | 0 t/{t1301-field_grep_-ftime=.in => t1301-field_grep.in} | 0 "t/t1310-currency_-f,\\K.in" => t/t1310-currency.in | 0 t/t1311-currency_zoom.in | 1 + ...cy_zoom_-L6-_-f,([0-9.]{5})_--value-length=6_--minval=1.in | 1 - t/t1312-currency-crop.in | 1 + ..._--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-s.in | 1 - ...-earthquakes_-f([.0-9]+)(?=,m).in => t1320-earthquakes.in} | 0 "t/t1330-pokemon_-f(?<=\\().in" => t/t1330-pokemon.in | 0 t/{t1401-magnitude_-H.in => t1401-magnitude.in} | 0 t/{t1403-precision_-H.in => t1403-precision.in} | 0 t/{t1501-end_limit_-L3.in => t1501-end_limit.in} | 0 t/{t1502-start_limit_-L9-.in => t1502-start_limit.in} | 0 t/{t1503-partial_-L1-2.in => t1503-partial.in} | 0 ...integer_statistics_-sL0.in => t1601-integer_statistics.in} | 0 ...602-float_statistics_-sL0.in => t1602-float_statistics.in} | 0 t/t1801-progress.in | 1 + "t/t1801-progress_-t-1_-ftime=\\K.in" | 1 - t/{t1901-technicolor_-cs_--header.in => t1901-technicolor.in} | 0 t/t1912-currency_part.in | 1 + ...--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-cs.in | 1 - ...ncolored_-c_--palette=.in => t1920-colorwave_uncolored.in} | 0 t/t1921-colorwave_unicolor.in | 1 + t/t1921-colorwave_unicolor_-c_--palette=1.in | 1 - t/t1922-colorwave_duocolor.in | 1 + t/t1922-colorwave_duocolor_-c_--palette=40,0.in | 1 - t/t1923-colorwave_tricolor.in | 1 + t/t1923-colorwave_tricolor_-c_--palette=41,0,42.in | 1 - t/t1924-colorwave_custom_palette.in | 1 + ...24-colorwave_custom_palette_-c_--palette=31,41,43,42,32.in | 1 - t/t1931-colorwave_fire.in | 1 + t/t1931-colorwave_fire_-c_--palette=fire.in | 1 - t/t1932-colorwave_fireworks.in | 1 + t/t1932-colorwave_fireworks_-c_--palette=fire256.in | 1 - 45 files changed, 12 insertions(+), 12 deletions(-) rename t/{t1012-unmarked_--markers=.in => t1012-unmarked.in} (100%) rename t/{t1101-wow_much_length_-l30.in => t1101-wow_much_length.in} (100%) rename t/{t1102-strip_contents_-l0.in => t1102-strip_contents.in} (100%) rename t/{t1103-only_separators_-l1.in => t1103-only_separators.in} (100%) rename t/{t1104-abbreviate_contents_-l5.in => t1104-abbreviate_contents.in} (100%) rename t/{t1105-length_percentage_-l50%.in => t1105-length_percentage.in} (100%) rename t/{t1106-forced_length_-l-30.in => t1106-forced_length.in} (100%) rename t/{t1200-unaligned_-u.in => t1200-unaligned.in} (100%) rename t/{t1201-unchanged_-uw1.in => t1201-unchanged.in} (100%) rename t/{t1202-abbreviate_total_-ul8.in => t1202-abbreviate_total.in} (100%) rename t/{t1300-field_number_-f2.in => t1300-field_number.in} (100%) rename t/{t1301-field_grep_-ftime=.in => t1301-field_grep.in} (100%) rename "t/t1310-currency_-f,\\K.in" => t/t1310-currency.in (100%) create mode 120000 t/t1311-currency_zoom.in delete mode 120000 t/t1311-currency_zoom_-L6-_-f,([0-9.]{5})_--value-length=6_--minval=1.in create mode 120000 t/t1312-currency-crop.in delete mode 120000 t/t1312-currency-crop_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-s.in rename t/{t1320-earthquakes_-f([.0-9]+)(?=,m).in => t1320-earthquakes.in} (100%) rename "t/t1330-pokemon_-f(?<=\\().in" => t/t1330-pokemon.in (100%) rename t/{t1401-magnitude_-H.in => t1401-magnitude.in} (100%) rename t/{t1403-precision_-H.in => t1403-precision.in} (100%) rename t/{t1501-end_limit_-L3.in => t1501-end_limit.in} (100%) rename t/{t1502-start_limit_-L9-.in => t1502-start_limit.in} (100%) rename t/{t1503-partial_-L1-2.in => t1503-partial.in} (100%) rename t/{t1601-integer_statistics_-sL0.in => t1601-integer_statistics.in} (100%) rename t/{t1602-float_statistics_-sL0.in => t1602-float_statistics.in} (100%) create mode 120000 t/t1801-progress.in delete mode 120000 "t/t1801-progress_-t-1_-ftime=\\K.in" rename t/{t1901-technicolor_-cs_--header.in => t1901-technicolor.in} (100%) create mode 120000 t/t1912-currency_part.in delete mode 120000 t/t1912-currency_part_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-cs.in rename t/{t1920-colorwave_uncolored_-c_--palette=.in => t1920-colorwave_uncolored.in} (100%) create mode 120000 t/t1921-colorwave_unicolor.in delete mode 120000 t/t1921-colorwave_unicolor_-c_--palette=1.in create mode 120000 t/t1922-colorwave_duocolor.in delete mode 120000 t/t1922-colorwave_duocolor_-c_--palette=40,0.in create mode 120000 t/t1923-colorwave_tricolor.in delete mode 120000 t/t1923-colorwave_tricolor_-c_--palette=41,0,42.in create mode 120000 t/t1924-colorwave_custom_palette.in delete mode 120000 t/t1924-colorwave_custom_palette_-c_--palette=31,41,43,42,32.in create mode 120000 t/t1931-colorwave_fire.in delete mode 120000 t/t1931-colorwave_fire_-c_--palette=fire.in create mode 120000 t/t1932-colorwave_fireworks.in delete mode 120000 t/t1932-colorwave_fireworks_-c_--palette=fire256.in diff --git a/t/regress.t b/t/regress.t index 2293efa..6a95a9f 100755 --- a/t/regress.t +++ b/t/regress.t @@ -30,7 +30,7 @@ for candidate in ${@:-t*.out} do test_count=$((test_count+1)) file="${candidate%.out}" - input="$file.in" + input="${file%%_-*}.in" name="$(echo ${file#*-} | tr _ \ )" set -- barcat @@ -38,7 +38,7 @@ do case "$name" in *\ -*) set -- "$@" -"${name#* -}";; esac case "$name" in *' |'*) set -- sh -c "\$0 \$1 | ${name#* |}" "$@";; - *) set -- "$1" "$2" $3 + *) set -- "$1" $2 $3 esac if test -n "$regenerate" diff --git a/t/t1012-unmarked_--markers=.in b/t/t1012-unmarked.in similarity index 100% rename from t/t1012-unmarked_--markers=.in rename to t/t1012-unmarked.in diff --git a/t/t1101-wow_much_length_-l30.in b/t/t1101-wow_much_length.in similarity index 100% rename from t/t1101-wow_much_length_-l30.in rename to t/t1101-wow_much_length.in diff --git a/t/t1102-strip_contents_-l0.in b/t/t1102-strip_contents.in similarity index 100% rename from t/t1102-strip_contents_-l0.in rename to t/t1102-strip_contents.in diff --git a/t/t1103-only_separators_-l1.in b/t/t1103-only_separators.in similarity index 100% rename from t/t1103-only_separators_-l1.in rename to t/t1103-only_separators.in diff --git a/t/t1104-abbreviate_contents_-l5.in b/t/t1104-abbreviate_contents.in similarity index 100% rename from t/t1104-abbreviate_contents_-l5.in rename to t/t1104-abbreviate_contents.in diff --git a/t/t1105-length_percentage_-l50%.in b/t/t1105-length_percentage.in similarity index 100% rename from t/t1105-length_percentage_-l50%.in rename to t/t1105-length_percentage.in diff --git a/t/t1106-forced_length_-l-30.in b/t/t1106-forced_length.in similarity index 100% rename from t/t1106-forced_length_-l-30.in rename to t/t1106-forced_length.in diff --git a/t/t1200-unaligned_-u.in b/t/t1200-unaligned.in similarity index 100% rename from t/t1200-unaligned_-u.in rename to t/t1200-unaligned.in diff --git a/t/t1201-unchanged_-uw1.in b/t/t1201-unchanged.in similarity index 100% rename from t/t1201-unchanged_-uw1.in rename to t/t1201-unchanged.in diff --git a/t/t1202-abbreviate_total_-ul8.in b/t/t1202-abbreviate_total.in similarity index 100% rename from t/t1202-abbreviate_total_-ul8.in rename to t/t1202-abbreviate_total.in diff --git a/t/t1300-field_number_-f2.in b/t/t1300-field_number.in similarity index 100% rename from t/t1300-field_number_-f2.in rename to t/t1300-field_number.in diff --git a/t/t1301-field_grep_-ftime=.in b/t/t1301-field_grep.in similarity index 100% rename from t/t1301-field_grep_-ftime=.in rename to t/t1301-field_grep.in diff --git "a/t/t1310-currency_-f,\\K.in" b/t/t1310-currency.in similarity index 100% rename from "t/t1310-currency_-f,\\K.in" rename to t/t1310-currency.in diff --git a/t/t1311-currency_zoom.in b/t/t1311-currency_zoom.in new file mode 120000 index 0000000..4c5d532 --- /dev/null +++ b/t/t1311-currency_zoom.in @@ -0,0 +1 @@ +t1310-currency.in \ No newline at end of file diff --git a/t/t1311-currency_zoom_-L6-_-f,([0-9.]{5})_--value-length=6_--minval=1.in b/t/t1311-currency_zoom_-L6-_-f,([0-9.]{5})_--value-length=6_--minval=1.in deleted file mode 120000 index 40e390f..0000000 --- a/t/t1311-currency_zoom_-L6-_-f,([0-9.]{5})_--value-length=6_--minval=1.in +++ /dev/null @@ -1 +0,0 @@ -t1310-currency_-f,\K.in \ No newline at end of file diff --git a/t/t1312-currency-crop.in b/t/t1312-currency-crop.in new file mode 120000 index 0000000..4c5d532 --- /dev/null +++ b/t/t1312-currency-crop.in @@ -0,0 +1 @@ +t1310-currency.in \ No newline at end of file diff --git a/t/t1312-currency-crop_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-s.in b/t/t1312-currency-crop_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-s.in deleted file mode 120000 index 40e390f..0000000 --- a/t/t1312-currency-crop_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-s.in +++ /dev/null @@ -1 +0,0 @@ -t1310-currency_-f,\K.in \ No newline at end of file diff --git a/t/t1320-earthquakes_-f([.0-9]+)(?=,m).in b/t/t1320-earthquakes.in similarity index 100% rename from t/t1320-earthquakes_-f([.0-9]+)(?=,m).in rename to t/t1320-earthquakes.in diff --git "a/t/t1330-pokemon_-f(?<=\\().in" b/t/t1330-pokemon.in similarity index 100% rename from "t/t1330-pokemon_-f(?<=\\().in" rename to t/t1330-pokemon.in diff --git a/t/t1401-magnitude_-H.in b/t/t1401-magnitude.in similarity index 100% rename from t/t1401-magnitude_-H.in rename to t/t1401-magnitude.in diff --git a/t/t1403-precision_-H.in b/t/t1403-precision.in similarity index 100% rename from t/t1403-precision_-H.in rename to t/t1403-precision.in diff --git a/t/t1501-end_limit_-L3.in b/t/t1501-end_limit.in similarity index 100% rename from t/t1501-end_limit_-L3.in rename to t/t1501-end_limit.in diff --git a/t/t1502-start_limit_-L9-.in b/t/t1502-start_limit.in similarity index 100% rename from t/t1502-start_limit_-L9-.in rename to t/t1502-start_limit.in diff --git a/t/t1503-partial_-L1-2.in b/t/t1503-partial.in similarity index 100% rename from t/t1503-partial_-L1-2.in rename to t/t1503-partial.in diff --git a/t/t1601-integer_statistics_-sL0.in b/t/t1601-integer_statistics.in similarity index 100% rename from t/t1601-integer_statistics_-sL0.in rename to t/t1601-integer_statistics.in diff --git a/t/t1602-float_statistics_-sL0.in b/t/t1602-float_statistics.in similarity index 100% rename from t/t1602-float_statistics_-sL0.in rename to t/t1602-float_statistics.in diff --git a/t/t1801-progress.in b/t/t1801-progress.in new file mode 120000 index 0000000..3968c2e --- /dev/null +++ b/t/t1801-progress.in @@ -0,0 +1 @@ +t1301-field_grep.in \ No newline at end of file diff --git "a/t/t1801-progress_-t-1_-ftime=\\K.in" "b/t/t1801-progress_-t-1_-ftime=\\K.in" deleted file mode 120000 index 170f92d..0000000 --- "a/t/t1801-progress_-t-1_-ftime=\\K.in" +++ /dev/null @@ -1 +0,0 @@ -t1301-field_grep_-ftime=.in \ No newline at end of file diff --git a/t/t1901-technicolor_-cs_--header.in b/t/t1901-technicolor.in similarity index 100% rename from t/t1901-technicolor_-cs_--header.in rename to t/t1901-technicolor.in diff --git a/t/t1912-currency_part.in b/t/t1912-currency_part.in new file mode 120000 index 0000000..4c5d532 --- /dev/null +++ b/t/t1912-currency_part.in @@ -0,0 +1 @@ +t1310-currency.in \ No newline at end of file diff --git a/t/t1912-currency_part_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-cs.in b/t/t1912-currency_part_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-cs.in deleted file mode 120000 index 40e390f..0000000 --- a/t/t1912-currency_part_-f,_--value-length=7_--minval=1.1_--maxval=1.11_-L10-30_-cs.in +++ /dev/null @@ -1 +0,0 @@ -t1310-currency_-f,\K.in \ No newline at end of file diff --git a/t/t1920-colorwave_uncolored_-c_--palette=.in b/t/t1920-colorwave_uncolored.in similarity index 100% rename from t/t1920-colorwave_uncolored_-c_--palette=.in rename to t/t1920-colorwave_uncolored.in diff --git a/t/t1921-colorwave_unicolor.in b/t/t1921-colorwave_unicolor.in new file mode 120000 index 0000000..e52ee82 --- /dev/null +++ b/t/t1921-colorwave_unicolor.in @@ -0,0 +1 @@ +t1920-colorwave_uncolored.in \ No newline at end of file diff --git a/t/t1921-colorwave_unicolor_-c_--palette=1.in b/t/t1921-colorwave_unicolor_-c_--palette=1.in deleted file mode 120000 index 5ecaf32..0000000 --- a/t/t1921-colorwave_unicolor_-c_--palette=1.in +++ /dev/null @@ -1 +0,0 @@ -t1920-colorwave_uncolored_-c_--palette=.in \ No newline at end of file diff --git a/t/t1922-colorwave_duocolor.in b/t/t1922-colorwave_duocolor.in new file mode 120000 index 0000000..e52ee82 --- /dev/null +++ b/t/t1922-colorwave_duocolor.in @@ -0,0 +1 @@ +t1920-colorwave_uncolored.in \ No newline at end of file diff --git a/t/t1922-colorwave_duocolor_-c_--palette=40,0.in b/t/t1922-colorwave_duocolor_-c_--palette=40,0.in deleted file mode 120000 index 5ecaf32..0000000 --- a/t/t1922-colorwave_duocolor_-c_--palette=40,0.in +++ /dev/null @@ -1 +0,0 @@ -t1920-colorwave_uncolored_-c_--palette=.in \ No newline at end of file diff --git a/t/t1923-colorwave_tricolor.in b/t/t1923-colorwave_tricolor.in new file mode 120000 index 0000000..e52ee82 --- /dev/null +++ b/t/t1923-colorwave_tricolor.in @@ -0,0 +1 @@ +t1920-colorwave_uncolored.in \ No newline at end of file diff --git a/t/t1923-colorwave_tricolor_-c_--palette=41,0,42.in b/t/t1923-colorwave_tricolor_-c_--palette=41,0,42.in deleted file mode 120000 index 5ecaf32..0000000 --- a/t/t1923-colorwave_tricolor_-c_--palette=41,0,42.in +++ /dev/null @@ -1 +0,0 @@ -t1920-colorwave_uncolored_-c_--palette=.in \ No newline at end of file diff --git a/t/t1924-colorwave_custom_palette.in b/t/t1924-colorwave_custom_palette.in new file mode 120000 index 0000000..e52ee82 --- /dev/null +++ b/t/t1924-colorwave_custom_palette.in @@ -0,0 +1 @@ +t1920-colorwave_uncolored.in \ No newline at end of file diff --git a/t/t1924-colorwave_custom_palette_-c_--palette=31,41,43,42,32.in b/t/t1924-colorwave_custom_palette_-c_--palette=31,41,43,42,32.in deleted file mode 120000 index 5ecaf32..0000000 --- a/t/t1924-colorwave_custom_palette_-c_--palette=31,41,43,42,32.in +++ /dev/null @@ -1 +0,0 @@ -t1920-colorwave_uncolored_-c_--palette=.in \ No newline at end of file diff --git a/t/t1931-colorwave_fire.in b/t/t1931-colorwave_fire.in new file mode 120000 index 0000000..e52ee82 --- /dev/null +++ b/t/t1931-colorwave_fire.in @@ -0,0 +1 @@ +t1920-colorwave_uncolored.in \ No newline at end of file diff --git a/t/t1931-colorwave_fire_-c_--palette=fire.in b/t/t1931-colorwave_fire_-c_--palette=fire.in deleted file mode 120000 index 5ecaf32..0000000 --- a/t/t1931-colorwave_fire_-c_--palette=fire.in +++ /dev/null @@ -1 +0,0 @@ -t1920-colorwave_uncolored_-c_--palette=.in \ No newline at end of file diff --git a/t/t1932-colorwave_fireworks.in b/t/t1932-colorwave_fireworks.in new file mode 120000 index 0000000..e52ee82 --- /dev/null +++ b/t/t1932-colorwave_fireworks.in @@ -0,0 +1 @@ +t1920-colorwave_uncolored.in \ No newline at end of file diff --git a/t/t1932-colorwave_fireworks_-c_--palette=fire256.in b/t/t1932-colorwave_fireworks_-c_--palette=fire256.in deleted file mode 120000 index 5ecaf32..0000000 --- a/t/t1932-colorwave_fireworks_-c_--palette=fire256.in +++ /dev/null @@ -1 +0,0 @@ -t1920-colorwave_uncolored_-c_--palette=.in \ No newline at end of file -- 2.30.0