Test the locale month name width stuff

This commit modifies a specific file timestamp so we test both July (which is 5 characters in French) and December (which is 4 characters in Japanese). It’s also kind of a test for locales as well.
This commit is contained in:
Benjamin Sago 2017-08-06 22:25:00 +01:00
parent 4cb28593fd
commit 115315a03c
9 changed files with 30 additions and 7 deletions

15
Vagrantfile vendored
View File

@ -296,8 +296,8 @@ Vagrant.configure(2) do |config|
EOF
old = '200303030000.00'
med = '200606152314.29'
new = '200907221038.53'
med = '200606152314.29' # the june gets used for fr_FR locale tests
new = '200912221038.53' # and the december for ja_JP local tests
# Awkward date and time testcases.
config.vm.provision :shell, privileged: false, inline: <<-EOF
@ -429,6 +429,17 @@ Vagrant.configure(2) do |config|
EOF
# Set up some locales
config.vm.provision :shell, privileged: false, inline: <<-EOF
set -xe
# uncomment these from the config file
sudo sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen
sudo sed -i '/ja_JP.UTF-8/s/^# //g' /etc/locale.gen
sudo locale-gen
EOF
# Install kcov for test coverage
# This doesnt run coverage over the xtests so its less useful for now
if ENV.key?('INSTALL_KCOV')

View File

@ -1,4 +1,4 @@
Permissions Size User Date Accessed Name
.rw-rw-r-- 0 cassowary  3 Mar 2003 plum
.rw-rw-r-- 0 cassowary 15 Jun 2006 pear
.rw-rw-r-- 0 cassowary 22 Jul 2009 peach
.rw-rw-r-- 0 cassowary 22 Dec 2009 peach

3
xtests/dates_fr Normal file
View File

@ -0,0 +1,3 @@
.rw-rw-r-- 0 cassowary 15 juin 2006 peach
.rw-rw-r-- 0 cassowary  3 mars 2003 pear
.rw-rw-r-- 0 cassowary 22 déc. 2009 plum

View File

@ -1,3 +1,3 @@
.rw-rw-r-- 0 cassowary 2006-06-15 23:14:29.000000000 +0000 peach
.rw-rw-r-- 0 cassowary 2003-03-03 00:00:00.000000000 +0000 pear
.rw-rw-r-- 0 cassowary 2009-07-22 10:38:53.000000000 +0000 plum
.rw-rw-r-- 0 cassowary 2009-12-22 10:38:53.000000000 +0000 plum

View File

@ -1,3 +1,3 @@
.rw-rw-r-- 0 cassowary 2006-06-15 peach
.rw-rw-r-- 0 cassowary 2003-03-03 pear
.rw-rw-r-- 0 cassowary 2009-07-22 plum
.rw-rw-r-- 0 cassowary 2009-12-22 plum

3
xtests/dates_jp Normal file
View File

@ -0,0 +1,3 @@
.rw-rw-r-- 0 cassowary 15 6月 2006 peach
.rw-rw-r-- 0 cassowary  3 3月 2003 pear
.rw-rw-r-- 0 cassowary 22 12月 2009 plum

View File

@ -1,3 +1,3 @@
.rw-rw-r-- 0 cassowary 2006-06-15 23:14 peach
.rw-rw-r-- 0 cassowary 2003-03-03 00:00 pear
.rw-rw-r-- 0 cassowary 2009-07-22 10:38 plum
.rw-rw-r-- 0 cassowary 2009-12-22 10:38 plum

View File

@ -1,4 +1,4 @@
Permissions Size User Date Modified Name
.rw-rw-r-- 0 cassowary  3 Mar 2003 pear
.rw-rw-r-- 0 cassowary 15 Jun 2006 peach
.rw-rw-r-- 0 cassowary 22 Jul 2009 plum
.rw-rw-r-- 0 cassowary 22 Dec 2009 plum

View File

@ -116,6 +116,12 @@ $exa $testcases/dates -l --time-style=long-iso 2>&1 | diff -q - $results/d
$exa $testcases/dates -l --time-style=full-iso 2>&1 | diff -q - $results/dates_full_iso || exit 1
$exa $testcases/dates -l --time-style=iso 2>&1 | diff -q - $results/dates_iso || exit 1
# Locales
# These two are used in particular because they have 5-long and 4-long
# month names respectively
env LANG=fr_FR.UTF-8 $exa $testcases/dates -l | diff -q - $results/dates_fr || exit 1
env LANG=ja_JP.UTF-8 $exa $testcases/dates -l | diff -q - $results/dates_jp || exit 1
# Paths and directories
# These directories are created in the VM users home directory (the default