diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5219163..1916bfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,6 +81,17 @@ jobs: target: gpscorrelate install_target: install valgrind: yes + - name: 'locale tests' + cc: gcc + gtk: 3 + install: desktop-file-utils docbook-xsl exiv2 libexiv2-dev libgtk-3-dev xsltproc gettext locales-all + cflags: -Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1 + cxx: g++ + target: all + install_target: install install-po install-desktop-file + # Turkish is one of the better locales to test in that it has unusual + # upper/lowercase folding and comma as decimal separator. + locale: tr_TR steps: - uses: actions/checkout@v4 @@ -103,6 +114,23 @@ jobs: - if: matrix.build.valgrind == 'yes' name: 'valgrind test' run: make check CHECK_OPTIONS='-v -m' + - if: matrix.build.locale + name: 'locale test' + env: + LC_ADDRESS: ${{ matrix.build.locale }} + LC_COLLATE: ${{ matrix.build.locale }} + LC_CTYPE: ${{ matrix.build.locale }} + LC_IDENTIFICATION: ${{ matrix.build.locale }} + LC_MEASUREMENT: ${{ matrix.build.locale }} + LC_MESSAGES: ${{ matrix.build.locale }} + LC_MONETARY: ${{ matrix.build.locale }} + LC_NAME: ${{ matrix.build.locale }} + LC_NUMERIC: ${{ matrix.build.locale }} + LC_PAPER: ${{ matrix.build.locale }} + LC_SOURCED: ${{ matrix.build.locale }} + LC_TELEPHONE: ${{ matrix.build.locale }} + LC_TIME: ${{ matrix.build.locale }} + run: make check CHECK_OPTIONS='-v' - name: 'install test' run: make prefix= DESTDIR="${PWD}" ${{ matrix.build.install_target }} diff --git a/tests/data/test018.param b/tests/data/test018.param index fb128b5..4afbdb3 100644 --- a/tests/data/test018.param +++ b/tests/data/test018.param @@ -1,5 +1,5 @@ TITLE='Show GPS data on file' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM -s "$STAGINGDIR/withgps.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -s "$STAGINGDIR/withgps.jpg" > "$OUTFILE" 2>&1' RESULTCODE=0 SEDCOMMAND='s@^.*/@@' # strip path diff --git a/tests/data/test038.param b/tests/data/test038.param index 29f9344..4181e32 100644 --- a/tests/data/test038.param +++ b/tests/data/test038.param @@ -3,7 +3,7 @@ PRECOMMAND='cat "$STAGINGDIR/point2-1.jpg" >"$LOGDIR/test.jpg"' # This time zone is equivalent to America/Vancouver (at least, in 2012) # but should be more portable than using the symbolic name. # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C TZ="PST8PDT,M3.2.0,M11.1.0" $PROGRAM -v -g "$STAGINGDIR/track4.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C TZ="PST8PDT,M3.2.0,M11.1.0" $PROGRAM -v -g "$STAGINGDIR/track4.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='s@^/.*/|.*Copyright.*$@@' # strip path and copyright line diff --git a/tests/data/test039.param b/tests/data/test039.param index 3d587a2..1bcbac6 100644 --- a/tests/data/test039.param +++ b/tests/data/test039.param @@ -3,7 +3,7 @@ PRECOMMAND='cat "$STAGINGDIR/point2-2.jpg" >"$LOGDIR/test.jpg"' # This time zone is equivalent to America/Vancouver (at least, in 2012) # but should be more portable than using the symbolic name. # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C TZ="PST8PDT,M3.2.0,M11.1.0" $PROGRAM -v -g "$STAGINGDIR/track4.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C TZ="PST8PDT,M3.2.0,M11.1.0" $PROGRAM -v -g "$STAGINGDIR/track4.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='s@^/.*/|.*Copyright.*$@@' # strip path and copyright line diff --git a/tests/data/test040.param b/tests/data/test040.param index ac74e33..a317219 100644 --- a/tests/data/test040.param +++ b/tests/data/test040.param @@ -3,7 +3,7 @@ PRECOMMAND='cat "$STAGINGDIR/point7-1.jpg" >"$LOGDIR/test.jpg"' # This time zone is equivalent to America/Vancouver (at least, in 2012) # but should be more portable than using the symbolic name. # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C TZ="PST8PDT,M3.2.0,M11.1.0" $PROGRAM -v -g "$STAGINGDIR/track5.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C TZ="PST8PDT,M3.2.0,M11.1.0" $PROGRAM -v -g "$STAGINGDIR/track5.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='s@^/.*/|.*Copyright.*$@@' # strip path and copyright line diff --git a/tests/data/test042.param b/tests/data/test042.param index 8dca0a6..60a0d04 100644 --- a/tests/data/test042.param +++ b/tests/data/test042.param @@ -1,7 +1,7 @@ TITLE='Correlate a file with --timeadd west of UTC and aligned on the half hour' PRECOMMAND='cat "$STAGINGDIR/point3-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM --timeadd -3:30 -v -g "$STAGINGDIR/track6.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM --timeadd -3:30 -v -g "$STAGINGDIR/track6.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='s@^([a-zA-Z]:)?/.*/|.*Copyright.*$@@' # strip path and copyright line diff --git a/tests/data/test043.param b/tests/data/test043.param index 167bd65..babb7d5 100644 --- a/tests/data/test043.param +++ b/tests/data/test043.param @@ -1,7 +1,7 @@ TITLE='Correlate a file with --timeadd east of UTC' PRECOMMAND='cat "$STAGINGDIR/point4-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM --timeadd 1:00 -v -g "$STAGINGDIR/track2.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM --timeadd 1:00 -v -g "$STAGINGDIR/track2.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='s@^([a-zA-Z]:)?/.*/|.*Copyright.*$@@' # strip path and copyright line diff --git a/tests/data/test044.param b/tests/data/test044.param index 189a77e..6347fe3 100644 --- a/tests/data/test044.param +++ b/tests/data/test044.param @@ -1,7 +1,7 @@ TITLE='Fix a bad GPS date with --fix-datestamps' PRECOMMAND='cat "$STAGINGDIR/baddate.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to avoid errors when comparing days of week in output -COMMAND='env LC_ALL=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1 && $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_TIME=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1 && $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='s@^([a-zA-Z]:)?/.*/@@' # strip path diff --git a/tests/data/test051.param b/tests/data/test051.param index 6ab2190..b46b973 100644 --- a/tests/data/test051.param +++ b/tests/data/test051.param @@ -1,7 +1,7 @@ TITLE='Fix a bad GPS date with --fix-datestamps on a read-only file' PRECOMMAND='cat "$STAGINGDIR/baddate.jpg" >"$LOGDIR/test.jpg" && chmod a-w "$LOGDIR/test.jpg"' # Run in C locale to avoid errors when comparing days of week in output -COMMAND='env LC_ALL=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_TIME=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 SEDCOMMAND='1s@^.*/@@' # strip path diff --git a/tests/data/test054.param b/tests/data/test054.param index deb7565..56c0d2f 100644 --- a/tests/data/test054.param +++ b/tests/data/test054.param @@ -1,7 +1,7 @@ TITLE='Correlate many files, with a write failure' PRECOMMAND='for f in baddate.jpg noexif.jpg notime.jpg point1-1.jpg point1-2.jpg point2-1.jpg point2-2.jpg point7-1.jpg point3-1.jpg point4-1.jpg withgps.jpg; do cat "$STAGINGDIR/$f" >"$LOGDIR/test-$f"; done && chmod a-w "$LOGDIR/test-point1-2.jpg"' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM --verbose -t -z 0 -g "$STAGINGDIR/track3.gpx" "$LOGDIR"/test-baddate.jpg "$LOGDIR"/test-noexif.jpg "$LOGDIR"/test-notime.jpg "$LOGDIR"/test-point1-1.jpg "$LOGDIR"/test-point1-2.jpg "$LOGDIR"/test-point2-1.jpg "$LOGDIR"/test-point2-2.jpg "$LOGDIR"/test-point7-1.jpg "$LOGDIR"/test-point3-1.jpg "$LOGDIR"/test-point4-1.jpg "$LOGDIR"/test-withgps.jpg > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM --verbose -t -z 0 -g "$STAGINGDIR/track3.gpx" "$LOGDIR"/test-baddate.jpg "$LOGDIR"/test-noexif.jpg "$LOGDIR"/test-notime.jpg "$LOGDIR"/test-point1-1.jpg "$LOGDIR"/test-point1-2.jpg "$LOGDIR"/test-point2-1.jpg "$LOGDIR"/test-point2-2.jpg "$LOGDIR"/test-point7-1.jpg "$LOGDIR"/test-point3-1.jpg "$LOGDIR"/test-point4-1.jpg "$LOGDIR"/test-withgps.jpg > "$OUTFILE" 2>&1' POSTCOMMAND='for f in baddate.jpg noexif.jpg notime.jpg point1-1.jpg point1-2.jpg point2-1.jpg point2-2.jpg point7-1.jpg point3-1.jpg point4-1.jpg withgps.jpg; do rm -f "$LOGDIR/test-$f"; done' RESULTCODE=1 SEDCOMMAND='s@^([a-zA-Z]:)?/.*/|.*Copyright.*$@@' # strip path and copyright line diff --git a/tests/data/test059.param b/tests/data/test059.param index 1f1fbf8..095a89b 100644 --- a/tests/data/test059.param +++ b/tests/data/test059.param @@ -1,5 +1,5 @@ TITLE='Show GPS data on file with negative elevation' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM -s "$STAGINGDIR/point1-3.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -s "$STAGINGDIR/point1-3.jpg" > "$OUTFILE" 2>&1' RESULTCODE=0 SEDCOMMAND='s@^.*/@@' # strip path diff --git a/tests/data/test060.param b/tests/data/test060.param index af67dd6..02518c5 100644 --- a/tests/data/test060.param +++ b/tests/data/test060.param @@ -12,7 +12,7 @@ TITLE='Test that --no-mtime is implied by --fix-datestamps' # result, so they should not disrupt operation of the test suite. PRECOMMAND='cat "$STAGINGDIR/baddate.jpg" >"$LOGDIR/test.jpg" && touch -t 201001020304.05 "$LOGDIR/test.jpg" && touch "$LOGDIR/ztest.jpg"' # Run in C locale to avoid errors when comparing days of week in output -COMMAND='env LC_ALL=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && ls -t "$LOGDIR/ztest.jpg" "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_TIME=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && ls -t "$LOGDIR/ztest.jpg" "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg" "$LOGDIR/ztest.jpg"' RESULTCODE=0 SEDCOMMAND='s@([a-zA-Z]:)?/[^ ].*/@@' # strip paths diff --git a/tests/data/test063.param b/tests/data/test063.param index 7debb40..1294eaa 100644 --- a/tests/data/test063.param +++ b/tests/data/test063.param @@ -2,7 +2,7 @@ TITLE='Show GPS data on file in southern hemisphere' # Synthesize an appropriate file on which the run the real test PRECOMMAND='cat "$STAGINGDIR/point5-1.jpg" >"$LOGDIR/test.jpg" && $PROGRAM -z -14:00 -g "$STAGINGDIR/track7.gpx" "$LOGDIR/test.jpg" 2>"$OUTFILE" > /dev/null' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM -s "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -s "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='s@^.*/@@' # strip path diff --git a/tests/data/test079.param b/tests/data/test079.param index fee2405..d4e0d0b 100644 --- a/tests/data/test079.param +++ b/tests/data/test079.param @@ -1,7 +1,7 @@ TITLE='Test --fix-datestamps with --no-write' PRECOMMAND='cat "$STAGINGDIR/baddate.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to avoid errors when comparing days of week in output -COMMAND='env LC_ALL=C $PROGRAM --no-write --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_TIME=C $PROGRAM --no-write --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='1s@^.*/@@' # strip path diff --git a/tests/data/test082.param b/tests/data/test082.param index 88383b8..68ca564 100644 --- a/tests/data/test082.param +++ b/tests/data/test082.param @@ -1,7 +1,7 @@ TITLE='Fix bad date with --fix-datestamps with corrupt lat/long' PRECOMMAND='cat "$STAGINGDIR/baddate2.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to avoid errors when comparing days of week in output -COMMAND='env LC_ALL=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_TIME=C $PROGRAM --fix-datestamps -z -7 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 SEDCOMMAND='1s@^.*/@@' # strip path diff --git a/tests/data/test083.param b/tests/data/test083.param index cc547b9..7536a39 100644 --- a/tests/data/test083.param +++ b/tests/data/test083.param @@ -1,5 +1,5 @@ TITLE='Show GPS data on file with corrupt lat/long' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM -s "$STAGINGDIR/baddate2.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -s "$STAGINGDIR/baddate2.jpg" > "$OUTFILE" 2>&1' RESULTCODE=0 SEDCOMMAND='s@^.*/@@' # strip path diff --git a/tests/data/test098.param b/tests/data/test098.param index 651ea37..7151208 100644 --- a/tests/data/test098.param +++ b/tests/data/test098.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified latitude/longitude/elevation' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 12.34567,123.456,78.9 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 12.34567,123.456,78.9 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test099.param b/tests/data/test099.param index bbc4734..958f08f 100644 --- a/tests/data/test099.param +++ b/tests/data/test099.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified latitude/longitude w/o elevation' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l -89.000001,179.9 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l -89.000001,179.9 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test100.param b/tests/data/test100.param index 34260d9..af8a9ab 100644 --- a/tests/data/test100.param +++ b/tests/data/test100.param @@ -4,6 +4,7 @@ PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # present when the UTF-8 degrees symbol is being used, as it is here. # As can be seen, it's tricky to pass a single quote character into the test # suite. -COMMAND='env LC_CTYPE=UTF-8 $PROGRAM -z+1 -l -34d56m08.9s,-90°0'"\\'"'59.11111\" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +# Run in C locale to avoid errors when comparing numbers in output +COMMAND='env LC_CTYPE=UTF-8 LC_NUMERIC=C $PROGRAM -z+1 -l -34d56m08.9s,-90°0'"\\'"'59.11111\" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test101.param b/tests/data/test101.param index 73a4d74..55b9a55 100644 --- a/tests/data/test101.param +++ b/tests/data/test101.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified latitude/longitude/elevation, space separated' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 89.9999999\ 179.999\ 99999.999 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 89.9999999\ 179.999\ 99999.999 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test102.param b/tests/data/test102.param index c6c4ab2..a1f6adf 100644 --- a/tests/data/test102.param +++ b/tests/data/test102.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified latitude/longitude/elevation, tab separated' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l "-89.9999999 -179.999 -9999.999" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l "-89.9999999 -179.999 -9999.999" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test103.param b/tests/data/test103.param index 7bc111f..5da6565 100644 --- a/tests/data/test103.param +++ b/tests/data/test103.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified latitude/longitude, tab separated (dms forms)' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l "-89d59m59.9999s -179d59m059.999s" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l "-89d59m59.9999s -179d59m059.999s" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test104.param b/tests/data/test104.param index 7563165..183c1f5 100644 --- a/tests/data/test104.param +++ b/tests/data/test104.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified latitude/longitude, space separated (dms forms)' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l "+89d00m59.0000s +0179d059m059.000s" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l "+89d00m59.0000s +0179d059m059.000s" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test105.param b/tests/data/test105.param index c4498dd..85224ca 100644 --- a/tests/data/test105.param +++ b/tests/data/test105.param @@ -1,6 +1,6 @@ TITLE='Specify out-of-range latitude' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -l 92.34567,123.456,78.9 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -l 92.34567,123.456,78.9 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test107.param b/tests/data/test107.param index 46c2da0..d2b2268 100644 --- a/tests/data/test107.param +++ b/tests/data/test107.param @@ -1,6 +1,6 @@ TITLE='Specify out-of-range longitude' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -l 92.34567,180.456 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -l 92.34567,180.456 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test111.param b/tests/data/test111.param index e76cbd0..f04d7cf 100644 --- a/tests/data/test111.param +++ b/tests/data/test111.param @@ -4,6 +4,7 @@ PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # present when the UTF-8 degrees symbol is being used, as it is here. # As can be seen, it's tricky to pass a single quote character into the test # suite. -COMMAND='env LC_CTYPE=UTF-8 $PROGRAM -z+1 -l "-34d 56m 8.9s, -90° 0m 59.11111s 123.4" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +# Run in C locale to avoid errors when comparing numbers in output +COMMAND='env LC_CTYPE=UTF-8 LC_NUMERIC=C $PROGRAM -z+1 -l "-34d 56m 8.9s, -90° 0m 59.11111s 123.4" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test112.param b/tests/data/test112.param index 69ea401..9ffff16 100644 --- a/tests/data/test112.param +++ b/tests/data/test112.param @@ -4,6 +4,7 @@ PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # present when the UTF-8 degrees symbol is being used, as it is here. # As can be seen, it's tricky to pass a single quote character into the test # suite. -COMMAND='env LC_CTYPE=UTF-8 $PROGRAM -z+1 -l "-34d 56 08.9 -90° 0m 59.11111\" -123.4 " "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +# Run in C locale to avoid errors when comparing numbers in output +COMMAND='env LC_CTYPE=UTF-8 LC_NUMERIC=C $PROGRAM -z+1 -l "-34d 56 08.9 -90° 0m 59.11111\" -123.4 " "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test113.param b/tests/data/test113.param index d1e4014..8fe3c4c 100644 --- a/tests/data/test113.param +++ b/tests/data/test113.param @@ -2,6 +2,7 @@ TITLE='Geotag a file from a specified latitude/longitude (dms form with ISO 8859 PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # The degree symbol is in ISO 8859/1 but since it's hard-coded in the program, # it's unnecessary to actually be running in an ISO 8859/1 locale to work. -COMMAND='$PROGRAM -z+1 -l -34d56m08.9s,-90°0'"\\'"'59.11111\" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +# Run in C locale to avoid errors when comparing numbers in output +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l -34d56m08.9s,-90°0'"\\'"'59.11111\" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test117.param b/tests/data/test117.param index 8b5d229..5011b50 100644 --- a/tests/data/test117.param +++ b/tests/data/test117.param @@ -1,5 +1,5 @@ TITLE='Show GPS data with existing and nonexistent files' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM -s "$STAGINGDIR/withgps.jpg" does-not-exist "$STAGINGDIR/withgps.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -s "$STAGINGDIR/withgps.jpg" does-not-exist "$STAGINGDIR/withgps.jpg" > "$OUTFILE" 2>&1' RESULTCODE=1 SEDCOMMAND='s@([a-zA-Z]:)?/.*/@@' # strip path diff --git a/tests/data/test126.param b/tests/data/test126.param index 6463f2e..18fe51d 100644 --- a/tests/data/test126.param +++ b/tests/data/test126.param @@ -1,5 +1,5 @@ TITLE='Show GPS data on file with no elevation' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM -s "$STAGINGDIR/noelev.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -s "$STAGINGDIR/noelev.jpg" > "$OUTFILE" 2>&1' RESULTCODE=0 SEDCOMMAND='s@^.*/@@' # strip path diff --git a/tests/data/test127.param b/tests/data/test127.param index 7734ea9..bb5c66a 100644 --- a/tests/data/test127.param +++ b/tests/data/test127.param @@ -1,5 +1,5 @@ TITLE='Show GPS data on file with no elevation with --machine' # Run in C locale to avoid errors when comparing numbers in output -COMMAND='env LC_ALL=C $PROGRAM -o "$STAGINGDIR/noelev.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -o "$STAGINGDIR/noelev.jpg" > "$OUTFILE" 2>&1' RESULTCODE=0 SEDCOMMAND='s@([a-zA-Z]:)?/.*/@@' # strip path diff --git a/tests/data/test130.param b/tests/data/test130.param index 12b3882..e7211e4 100644 --- a/tests/data/test130.param +++ b/tests/data/test130.param @@ -1,6 +1,6 @@ TITLE='Specify unrepresentable latitude' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1e10001,1.0,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1e10001,1.0,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test131.param b/tests/data/test131.param index 03451eb..40956b5 100644 --- a/tests/data/test131.param +++ b/tests/data/test131.param @@ -1,6 +1,6 @@ TITLE='Specify unrepresentable longitude' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1.0,1e10001,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1.0,1e10001,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test132.param b/tests/data/test132.param index a4c0c39..885c903 100644 --- a/tests/data/test132.param +++ b/tests/data/test132.param @@ -1,6 +1,6 @@ TITLE='Specify unrepresentable elevation' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1.0,1.0,1e10001 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1.0,1.0,1e10001 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test133.param b/tests/data/test133.param index 659c079..fdeda36 100644 --- a/tests/data/test133.param +++ b/tests/data/test133.param @@ -1,6 +1,6 @@ TITLE='Specify invalid elevation' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1.0,1.0,bogus "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1.0,1.0,bogus "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test134.param b/tests/data/test134.param index 73dc611..d8b90e0 100644 --- a/tests/data/test134.param +++ b/tests/data/test134.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified latitude/longitude/elevation with E notation' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 12.34567,123.456,7.8e2 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 12.34567,123.456,7.8e2 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test135.param b/tests/data/test135.param index 107495c..72876a6 100644 --- a/tests/data/test135.param +++ b/tests/data/test135.param @@ -1,6 +1,6 @@ TITLE='Specify invalid latitude degrees (dms forms)' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1Xd2m3s,1d2m3s,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1Xd2m3s,1d2m3s,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test136.param b/tests/data/test136.param index 1f742c4..e2bbffd 100644 --- a/tests/data/test136.param +++ b/tests/data/test136.param @@ -1,6 +1,6 @@ TITLE='Specify invalid longitude minutes (dms forms)' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1d2m3s,1d2Xm3s,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1d2m3s,1d2Xm3s,1.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test137.param b/tests/data/test137.param index a6580ae..2add7bb 100644 --- a/tests/data/test137.param +++ b/tests/data/test137.param @@ -1,6 +1,6 @@ TITLE='Specify invalid elevation (dms forms)' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1d2Xm3s,1d2m3s,1X.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1d2Xm3s,1d2m3s,1X.0 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test138.param b/tests/data/test138.param index fc8705b..48e122c 100644 --- a/tests/data/test138.param +++ b/tests/data/test138.param @@ -1,6 +1,6 @@ TITLE='Specify unrepresentable elevation (dms forms)' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 1d2m3s,1d2m3s,1e10001 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 1d2m3s,1d2m3s,1e10001 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=1 diff --git a/tests/data/test139.param b/tests/data/test139.param index 4daba1d..3201ec1 100644 --- a/tests/data/test139.param +++ b/tests/data/test139.param @@ -4,6 +4,7 @@ PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # present when the UTF-8 degrees symbol is being used, as it is here. # As can be seen, it's tricky to pass a single quote character into the test # suite. -COMMAND='env LC_CTYPE=UTF-8 $PROGRAM -z+1 -l "-34d56m8.9s,-90d0m59s,123.4" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +# Run in C locale to avoid errors when comparing numbers in output +COMMAND='env LC_CTYPE=UTF-8 LC_NUMERIC=C $PROGRAM -z+1 -l "-34d56m8.9s,-90d0m59s,123.4" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test171.param b/tests/data/test171.param index 4492d78..f160449 100644 --- a/tests/data/test171.param +++ b/tests/data/test171.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified location with direction' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z+1 -l 12.34567,-123.456,78.9 --direction 321 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z+1 -l 12.34567,-123.456,78.9 --direction 321 "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0 diff --git a/tests/data/test172.param b/tests/data/test172.param index 3a2e78f..b4cd544 100644 --- a/tests/data/test172.param +++ b/tests/data/test172.param @@ -1,6 +1,6 @@ TITLE='Geotag a file from a specified location with direction and heading' PRECOMMAND='cat "$STAGINGDIR/point1-1.jpg" >"$LOGDIR/test.jpg"' # Run in C locale to correctly parse these decimal numbers -COMMAND='env LC_ALL=C $PROGRAM -z0 --latlong "12.34567,-123.456 78.9" --direction 12 --heading "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' +COMMAND='env LC_NUMERIC=C $PROGRAM -z0 --latlong "12.34567,-123.456 78.9" --direction 12 --heading "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1' POSTCOMMAND='rm -f "$LOGDIR/test.jpg"' RESULTCODE=0