monotone

monotone Mtn Source Tree

Root/tests/t_i18n_file.at

1# -*- Autoconf -*-
2
3AT_SETUP([importing files with a internationalized names])
4
5MONOTONE_SETUP
6
7EUROPEAN_UTF8=`printf "\xC3\xB6\xC3\xA4\xC3\xBc\xC3\x9F"`
8EUROPEAN_8859_1=`printf "\xF6\xE4\xFC\xDF"`
9
10JAPANESE_UTF8=`printf "\xE3\x81\xA6\xE3\x81\x99\xE3\x81\xA8"`
11JAPANESE_EUC_JP=`printf "\xA4\xC6\xA4\xB9\xA4\xC8"`
12
13AT_CHECK(mkdir tmp)
14AT_CHECK(touch "tmp/file name with spaces", [], [ignore], [ignore])
15AT_CHECK(touch "tmp/file+name-with_funny@symbols%etc:", [], [ignore], [ignore])
16AT_CHECK(touch "tmp/$EUROPEAN_UTF8", [], [ignore], [ignore])
17AT_CHECK(touch "tmp/$JAPANESE_UTF8", [], [ignore], [ignore])
18AT_CHECK(touch "tmp/$EUROPEAN_8859_1", [], [ignore], [ignore])
19AT_CHECK(touch "tmp/$JAPANESE_EUC_JP", [], [ignore], [ignore])
20
21AT_CHECK(MONOTONE add "tmp/file name with spaces", [], [ignore], [ignore])
22AT_CHECK(MONOTONE add "tmp/file+name-with_funny@symbols%etc:", [], [ignore], [ignore])
23
24# add some files with UTF8 names
25export LANG=en_US.utf8
26AT_CHECK(MONOTONE add "tmp/$EUROPEAN_UTF8", [], [ignore], [ignore])
27AT_CHECK(MONOTONE add "tmp/$JAPANESE_UTF8", [], [ignore], [ignore])
28
29# remove the UTF8 file, change locale, and add it again. both should work.
30export LANG=de_DE.iso88591
31AT_CHECK(MONOTONE drop "tmp/$EUROPEAN_8859_1", [], [ignore], [ignore])
32AT_CHECK(MONOTONE add "tmp/$EUROPEAN_8859_1", [], [ignore], [ignore])
33
34export LANG=ja_JP.eucjp
35AT_CHECK(MONOTONE drop "tmp/$JAPANESE_EUC_JP", [], [ignore], [ignore])
36AT_CHECK(MONOTONE add "tmp/$JAPANESE_EUC_JP", [], [ignore], [ignore])
37
38AT_CHECK(MONOTONE --branch=testbranch commit 'blah blah', [], [ignore], [ignore])
39AT_CHECK(grep funny MT/manifest, [], [ignore], [ignore])
40AT_CHECK(grep spaces MT/manifest, [], [ignore], [ignore])
41AT_CHECK(grep $JAPANESE_UTF8 MT/manifest, [], [ignore], [ignore])
42AT_CHECK(grep $EUROPEAN_UTF8 MT/manifest, [], [ignore], [ignore])
43
44AT_CHECK(rm -Rf tmp)
45
46AT_CLEANUP

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status