(t *testing.T)
| 48 | } |
| 49 | |
| 50 | func TestExportifyNushellSkipsInvalidNames(t *testing.T) { |
| 51 | got := exportifyNushell(io.Discard, map[string]string{ |
| 52 | "GOOD": "value", |
| 53 | "//": "comment", |
| 54 | }) |
| 55 | |
| 56 | if !strings.Contains(got, `$env.GOOD = "value"`) { |
| 57 | t.Errorf("expected valid var to be exported, got:\n%s", got) |
| 58 | } |
| 59 | if strings.Contains(got, "//") { |
| 60 | t.Errorf("expected invalid name to be skipped, got:\n%s", got) |
| 61 | } |
| 62 | } |
nothing calls this directly
no test coverage detected