Skip to content

Commit

Permalink
Attempt to fix Windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Nov 11, 2024
1 parent 5a3dcff commit 67fbb4e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/test/shell/bazel/unicode_filenames_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,12 @@ EOF
}

function test_cc_dependency_with_utf8_filename() {
if "$is_windows"; then
# äöüÄÖÜß in UTF-8
local unicode=$(echo -e '\xC3\xA4\xC3\xB6\xC3\xBC\xC3\x84\xC3\x96\xC3\x9C\xC3\x9F')
else
# äöüÄÖÜß🌱 in UTF-8
local unicode=$(echo -e '\xC3\xA4\xC3\xB6\xC3\xBC\xC3\x84\xC3\x96\xC3\x9C\xC3\x9F\xF0\x9F\x8C\xB1')
fi
local -r unicode='äöüÄÖÜß🌱'

setup_module_dot_bazel

bazel info character-encoding

mkdir pkg
cat >pkg/BUILD <<EOF
cc_library(
Expand All @@ -221,7 +217,9 @@ EOF
cat >"pkg/${unicode}.h" <<EOF
#define MY_STRING "original"
EOF
cat >pkg/bin.cc <<EOF
# MSVC requires UTF-8 source files to start with a BOM.
printf '\xEF\xBB\xBF' > pkg/bin.cc
cat >>pkg/bin.cc <<EOF
#include "${unicode}.h"
#include <iostream>
Expand Down

0 comments on commit 67fbb4e

Please sign in to comment.