(t *testing.T)
| 238 | } |
| 239 | |
| 240 | func TestGenerateDropScriptTableOutput(t *testing.T) { |
| 241 | config := TraceConfig{ |
| 242 | EnableDrops: true, |
| 243 | EnableRST: true, |
| 244 | EnableErrors: true, |
| 245 | EnableRetransmits: true, |
| 246 | } |
| 247 | |
| 248 | gen := NewScriptGenerator(config) |
| 249 | script := gen.Generate() |
| 250 | |
| 251 | // Table output should have header |
| 252 | if !strings.Contains(script, "TIME") { |
| 253 | t.Error("table script missing TIME header") |
| 254 | } |
| 255 | if !strings.Contains(script, "TYPE") { |
| 256 | t.Error("table script missing TYPE header") |
| 257 | } |
| 258 | if !strings.Contains(script, "REASON") { |
| 259 | t.Error("table script missing REASON header") |
| 260 | } |
| 261 | if !strings.Contains(script, "STATE") { |
| 262 | t.Error("table script missing STATE header") |
| 263 | } |
| 264 | if !strings.Contains(script, "PROBE") { |
| 265 | t.Error("table script missing PROBE header") |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | func TestScriptGeneratorNoUserStringInterpolation(t *testing.T) { |
| 270 | // SECURITY TEST: Verify that user-provided values are never |
nothing calls this directly
no test coverage detected