@@ -16,19 +16,23 @@ func TestPathsWithMark(t *testing.T) {
1616 input := []cty.PathValueMarks {
1717 {
1818 Path : cty .GetAttrPath ("sensitive" ),
19- Marks : cty .NewValueMarks (Sensitive ),
19+ Marks : cty .NewValueMarks ("sensitive" ),
2020 },
2121 {
2222 Path : cty .GetAttrPath ("other" ),
2323 Marks : cty .NewValueMarks ("other" ),
2424 },
2525 {
2626 Path : cty .GetAttrPath ("both" ),
27- Marks : cty .NewValueMarks (Sensitive , "other" ),
27+ Marks : cty .NewValueMarks ("sensitive" , "other" ),
28+ },
29+ {
30+ Path : cty .GetAttrPath ("neither" ),
31+ Marks : cty .NewValueMarks ("x" , "y" ),
2832 },
2933 }
3034
31- gotPaths , gotOthers := PathsWithMark (input , Sensitive )
35+ gotPaths , gotOthers := PathsWithMark (input , "sensitive" )
3236 wantPaths := []cty.Path {
3337 cty .GetAttrPath ("sensitive" ),
3438 cty .GetAttrPath ("both" ),
@@ -40,14 +44,18 @@ func TestPathsWithMark(t *testing.T) {
4044 },
4145 {
4246 Path : cty .GetAttrPath ("both" ),
43- Marks : cty .NewValueMarks (Sensitive , "other" ),
47+ Marks : cty .NewValueMarks ("sensitive" , "other" ),
4448 // Note that this intentionally preserves the fact that the
4549 // attribute was both sensitive _and_ had another mark, since
4650 // that gives the caller the most possible information to
4751 // potentially handle this combination in a special way in
4852 // an error message, or whatever. It also conveniently avoids
4953 // allocating a new mark set, which is nice.
5054 },
55+ {
56+ Path : cty .GetAttrPath ("neither" ),
57+ Marks : cty .NewValueMarks ("x" , "y" ),
58+ },
5159 }
5260
5361 if diff := cmp .Diff (wantPaths , gotPaths , ctydebug .CmpOptions ); diff != "" {
0 commit comments