(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestEncodeSimpleIni(t *testing.T) { |
| 75 | branches := sops.TreeBranches{ |
| 76 | sops.TreeBranch{ |
| 77 | sops.TreeItem{ |
| 78 | Key: "DEFAULT", |
| 79 | Value: sops.TreeBranch{ |
| 80 | sops.TreeItem{ |
| 81 | Key: "foo", |
| 82 | Value: "bar", |
| 83 | }, |
| 84 | sops.TreeItem{ |
| 85 | Key: "baz", |
| 86 | Value: "3.0", |
| 87 | }, |
| 88 | sops.TreeItem{ |
| 89 | Key: "qux", |
| 90 | Value: "false", |
| 91 | }, |
| 92 | }, |
| 93 | }, |
| 94 | }, |
| 95 | } |
| 96 | out, err := Store{}.iniFromTreeBranches(branches) |
| 97 | assert.Nil(t, err) |
| 98 | expected, _ := Store{}.treeBranchesFromIni(out) |
| 99 | assert.Equal(t, expected, branches) |
| 100 | } |
| 101 | |
| 102 | func TestEncodeIniWithEscaping(t *testing.T) { |
| 103 | branches := sops.TreeBranches{ |
nothing calls this directly
no test coverage detected