Skip to content

Commit

Permalink
Fix some locale-related issues causing travis-ci tests to fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnw committed Jul 26, 2018
1 parent 4101e83 commit 7553bdc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,7 +1,7 @@
language: c language: c
compiler: gcc compiler: gcc
before_install: before_install:
- locale - sudo localedef -f ISO-8859-1 -i en_US en_US.ISO88591
before_script: before_script:
- ./configure - ./configure
- yes "" | make update - yes "" | make update
Expand Down
10 changes: 9 additions & 1 deletion test/alltests.sh.in
@@ -1,7 +1,15 @@
#!/bin/sh #!/bin/sh


CTYPE=$(locale -a | grep en_US.iso8859 | head -1)

if [ -z "${CTYPE}" ]; then
echo "Unable to find an en_US.iso8859 locale. Some tests will fail."
CTYPE=C
fi


export LC_COLLATE=C export LC_COLLATE=C
export LC_CTYPE=en_US.iso88591 export LC_CTYPE=${CTYPE}


exec @PERL@ runtest.pl $@ test*.pl exec @PERL@ runtest.pl $@ test*.pl


0 comments on commit 7553bdc

Please sign in to comment.