...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package literal
16
17 import (
18 "testing"
19 )
20
21 func TestIndentTabs(t *testing.T) {
22 testCases := []struct {
23 in string
24 out string
25 }{{
26 in: `"""
27 foo
28 bar
29 """`,
30 out: `"""
31 foo
32 bar
33 """`,
34 }, {
35 in: `"""
36 foo
37 bar
38 """`,
39 out: `"""
40 foo
41 bar
42 """`,
43 }, {
44 in: `""`,
45 out: `""`,
46 }}
47 for _, tc := range testCases {
48 t.Run("", func(t *testing.T) {
49 got := IndentTabs(tc.in, 3)
50 if got != tc.out {
51 t.Errorf("got %s; want %s", got, tc.out)
52 }
53 })
54 }
55 }
56
View as plain text