(ctx context.Context, t *testctx.T)
| 653 | } |
| 654 | |
| 655 | func (ShellSuite) TestStateInVarUsage(ctx context.Context, t *testctx.T) { |
| 656 | script := ` |
| 657 | dir=$(directory | with-new-file foo bar) |
| 658 | $dir | name |
| 659 | $dir | entries |
| 660 | ` |
| 661 | c := connect(ctx, t) |
| 662 | out, err := daggerCliBase(t, c).With(daggerShellNoMod(script)).Stdout(ctx) |
| 663 | |
| 664 | require.NoError(t, err) |
| 665 | require.Contains(t, out, "/") |
| 666 | require.Contains(t, out, "foo") |
| 667 | } |
| 668 | |
| 669 | func (ShellSuite) TestStateVarImmutability(ctx context.Context, t *testctx.T) { |
| 670 | script := ` |
nothing calls this directly
no test coverage detected