3 test_description
='Test non-breaking space character in various contexts'
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" &&
16 test_expect_success
'new patch with nbsp in name' '
17 echo "hello" > foo.txt &&
19 stg new "a${nbsp}patch" &&
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" &&
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}" &&
48 stg branch | grep "main${pound}"