(t *testing.T)
| 3 | import "testing" |
| 4 | |
| 5 | func TestReplace(t *testing.T) { |
| 6 | s := "POSTGRES_SQL://${PG_USER}:${PG_PASSWORD}@${PG_HOST}:${PG_PORT}/AUTHORS" |
| 7 | r := NewReplacer([]string{ |
| 8 | "PG_USER=user", |
| 9 | "PG_PASSWORD=password", |
| 10 | "PG_HOST=host", |
| 11 | "PG_PORT=port", |
| 12 | }) |
| 13 | e := "POSTGRES_SQL://user:password@host:port/AUTHORS" |
| 14 | if v := r.Replace(s); v != e { |
| 15 | t.Errorf("%s != %s", v, e) |
| 16 | } |
| 17 | } |
nothing calls this directly
no test coverage detected