chiark / gitweb /
stgit.el: Add "d" for a few diff commands, similar to git.el
[stgit] / t / t3200-non-ascii-filenames.sh
CommitLineData
82863c3c
KH
1#!/bin/sh
2test_description='Handle files with non-ASCII characters in their names'
3
4. ./test-lib.sh
5
adb61608
KH
6# Ignore our own output files.
7cat > .git/info/exclude <<EOF
8/expected.txt
9/output.txt
10EOF
11
82863c3c
KH
12test_expect_success 'Setup' '
13 echo "Fjäderholmarna" > skärgårdsö.txt &&
14 git add skärgårdsö.txt &&
15 git commit -m "Create island" &&
16 stg init &&
17 echo foo > unrelated.txt &&
18 git add unrelated.txt &&
adb61608 19 stg new p0 -m "Unrelated file" &&
82863c3c
KH
20 stg refresh &&
21 stg pop &&
22 rm skärgårdsö.txt &&
23 git commit -a -m "Remove island" &&
24 git tag upstream &&
25 git reset --hard HEAD^ &&
26 stg push
27'
28
fb9b3c02 29test_expect_success 'Rebase onto changed non-ASCII file' '
82863c3c
KH
30 stg rebase upstream
31'
32
adb61608
KH
33test_expect_success 'Setup' '
34 stg delete p0 &&
35 git reset --hard HEAD^ &&
36 echo "-- ett liv mitt ute i vattnet" >> skärgårdsö.txt &&
37 stg new p1 -m "Describe island"
38'
39
40cat > expected.txt <<EOF
41M skärgårdsö.txt
42EOF
8fe07fa4 43test_expect_success 'Status of modified non-ASCII file' '
adb61608
KH
44 stg status > output.txt &&
45 diff -u expected.txt output.txt
46'
47
48test_expect_success 'Refresh changes to non-ASCII file' '
49 stg refresh
50'
51
52cat > expected.txt <<EOF
53EOF
54test_expect_success 'Status after refresh' '
55 stg status > output.txt &&
56 diff -u expected.txt output.txt
57'
58
82863c3c 59test_done