Skip to content

Commit e9ae694

Browse files
committed
test: drop regression case from upstream PR scope
Signed-off-by: wyRainBow <weiyu9484@gmail.com>
1 parent de2dd45 commit e9ae694

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

template/template_test.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -478,31 +478,6 @@ func TestSubstituteWithReplacementAppliedFunc(t *testing.T) {
478478
assert.Check(t, is.ErrorContains(err, "bad choice"))
479479
}
480480

481-
func TestSubstituteWithReplacementAppliedFuncKeepsConfigForRest(t *testing.T) {
482-
hook, restore := captureWarnings(t)
483-
defer restore()
484-
485-
options := []Option{
486-
WithReplacementFunction(func(s string, m Mapping, c *Config) (string, error) {
487-
r, applied, err := DefaultReplacementAppliedFunc(s, m, c)
488-
if err == nil && !applied {
489-
return s, nil
490-
}
491-
return r, err
492-
}),
493-
WithoutLogging,
494-
}
495-
496-
missingMapping := func(string) (string, bool) {
497-
return "", false
498-
}
499-
500-
result, err := SubstituteWithOptions("ok ${FILE:-/tmp/file.jpg} --entry_id ${ENTRY_ID}", missingMapping, options...)
501-
assert.NilError(t, err)
502-
assert.Equal(t, "ok /tmp/file.jpg --entry_id ${ENTRY_ID}", result)
503-
assert.Equal(t, 0, len(hook.Entries))
504-
}
505-
506481
// TestPrecedence tests is the precedence on '-' and '?' is of the first match
507482
func TestPrecedence(t *testing.T) {
508483
testCases := []struct {

0 commit comments

Comments
 (0)