Skip to content

Commit

Permalink
add more context around skipped test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcervante committed Apr 22, 2024
1 parent 5fdb81b commit fe462a5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions hclsyntax/parse_traversal_test.go
Expand Up @@ -261,7 +261,9 @@ func TestParseTraversalAbs(t *testing.T) {
for _, test := range tests {
t.Run(test.src, func(t *testing.T) {
if test.src == "foo[*]" {
// Skip the test that introduces splat syntax.
// The foo[*] test will fail because the function we test in
// this branch does not support the splat syntax. So we will
// skip this test case here.
t.Skip("skipping test for unsupported splat syntax")
}

Expand All @@ -282,8 +284,11 @@ func TestParseTraversalAbs(t *testing.T) {

t.Run(fmt.Sprintf("partial_%s", test.src), func(t *testing.T) {
if test.src == "foo[*].bar" {
// Skip the test that's supposed to fail for splat syntax.
t.Skip("skipping test for unsupported splat syntax")
// The foo[*].bar test will fail because the function we test in
// this branch does support the splat syntax and this test is
// designed to make sure that the other branch still fails with
// the splat syntax. So we will skip this test case here.
t.Skip("skipping test that fails for splat syntax")
}

got, diags := ParseTraversalPartial([]byte(test.src), "", hcl.Pos{Line: 1, Column: 1})
Expand Down

0 comments on commit fe462a5

Please sign in to comment.