(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func TestBashRuntime_Execute(t *testing.T) { |
| 111 | runtime := NewBashRuntime(nil) |
| 112 | |
| 113 | if !runtime.IsAvailable() { |
| 114 | t.Skip("Bash not available") |
| 115 | } |
| 116 | |
| 117 | ctx := context.Background() |
| 118 | code := `echo "Hello, World!"` |
| 119 | input := map[string]any{} |
| 120 | |
| 121 | result, err := runtime.Execute(ctx, code, input) |
| 122 | if err != nil { |
| 123 | t.Fatalf("Execute failed: %v", err) |
| 124 | } |
| 125 | |
| 126 | if !result.Success { |
| 127 | t.Errorf("expected success, got error: %s", result.Error) |
| 128 | } |
| 129 | |
| 130 | if result.Output != "Hello, World!" { |
| 131 | t.Errorf("expected 'Hello, World!', got %v", result.Output) |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | func TestRuntimeManager_Execute(t *testing.T) { |
| 136 | manager := NewRuntimeManager(nil) |
nothing calls this directly
no test coverage detected