Tests redirect to err file when grepping stderr
[stgit.git] / t / t4401-nbsp.sh
blob63c0178cfc0a22db87284faff378de7544b67163
1 #!/bin/sh
3 test_description='Test non-breaking space character in various contexts'
5 . ./test-lib.sh
7 # Non-breaking space character
8 nbsp=$(printf '\302\240')
9 pound=$(printf '\302\243')
11 test_expect_success 'init branch with nbsp in name' '
12 git branch -m "main${nbsp}branch" &&
13 stg init
16 test_expect_success 'new patch with nbsp in name' '
17 echo "hello" > foo.txt &&
18 git add foo.txt &&
19 stg new "a${nbsp}patch" &&
20 stg refresh
23 test_expect_success 'patch with nbsp in description' '
24 stg new -m "b${nbsp}patch" &&
25 test "$(echo $(stg series --noprefix))" = "a${nbsp}patch b-patch"
28 test_expect_success 'push pop patch with nbsp' '
29 stg pop "a${nbsp}patch" &&
30 stg push "a${nbsp}patch" &&
31 test "$(stg top)" = "a${nbsp}patch"
34 test_expect_success 'delete patch with nbsp in name' '
35 stg delete "a${nbsp}patch"
38 test_expect_success 'Non-breaking space in branch name' '
39 stg branch --create "foo${nbsp}bar" &&
40 stg branch --list &&
41 stg branch "main${nbsp}branch" &&
42 stg branch --delete "foo${nbsp}bar"
45 test_expect_success 'Other non-ascii character in branch name' '
46 git branch -m "main${pound}" &&
47 stg init &&
48 stg branch | grep "main${pound}"
51 test_done