Build windows 64bit binary using UCRT64 (#2832)

* Build windows 64bit binary using UCRT64

Is the default and recommended msystem setting. Will produce
binaries that are compatible with windows 10 and later.

Also run tests for 32bit build.

Related to #2831

* Use jq -b in tests/shtest

* Add Windows strptime

* Make Windows-optional tests not run on Windows again

---------

Co-authored-by: Nicolas Williams <nico@cryptonector.com>
This commit is contained in:
Mattias WadmanandNicolas Williams authored and GitHub committed 2023-08-12 20:18:45 +02:00
1 parent 5a52553a3b
commit fdab39bc7b
6 files changed
+876 -39

No files matched your search

+21 -5
View File
@@ -2,6 +2,9 @@
. "${0%/*}/setup" "$@"
JQ_NO_B=$JQ
JQ="$JQ -b"
PATH=$JQBASEDIR:$PATH $JQBASEDIR/tests/jq-f-test.sh > /dev/null
if [ -f "$JQBASEDIR/.libs/libinject_errors.so" ]; then
@@ -493,7 +496,12 @@ cmp $d/color $d/expect
cmp $d/warning $d/expect_warning
# Check $NO_COLOR
if command -v script >/dev/null 2>&1; then
case "$(uname -s)" in
MSYS*) test_no_color=false;;
MINGW*) test_no_color=false;;
*) test_no_color=true;;
esac
if $test_no_color && command -v script >/dev/null 2>&1; then
unset NO_COLOR
if script -qc echo /dev/null >/dev/null 2>&1; then
faketty() { script -qec "$*" /dev/null; }
@@ -502,17 +510,25 @@ if command -v script >/dev/null 2>&1; then
sed 's/^\x5E\x44\x08\x08//'; }
fi
faketty $JQ -n . > $d/color
faketty $JQ_NO_B -n . > $d/color
printf '\033[0;90mnull\033[0m\r\n' > $d/expect
od -c $d/expect
od -c $d/color
cmp $d/color $d/expect
NO_COLOR= faketty $JQ -n . > $d/color
NO_COLOR= faketty $JQ_NO_B -n . > $d/color
printf '\033[0;90mnull\033[0m\r\n' > $d/expect
od -c $d/expect
od -c $d/color
cmp $d/color $d/expect
NO_COLOR=1 faketty $JQ -n . > $d/color
NO_COLOR=1 faketty $JQ_NO_B -n . > $d/color
printf 'null\r\n' > $d/expect
od -c $d/expect
od -c $d/color
cmp $d/color $d/expect
NO_COLOR=1 faketty $JQ -Cn . > $d/color
NO_COLOR=1 faketty $JQ_NO_B -Cn . > $d/color
printf '\033[0;90mnull\033[0m\r\n' > $d/expect
od -c $d/expect
od -c $d/color
cmp $d/color $d/expect
fi