(t *testing.T)
| 54 | } |
| 55 | |
| 56 | func TestSandboxFilePath(t *testing.T) { |
| 57 | root := t.TempDir() |
| 58 | |
| 59 | path, err := sandboxFilePath(root, root, "keys/deploy.pub") |
| 60 | require.NoError(t, err) |
| 61 | assert.Equal(t, filepath.Join(root, "keys/deploy.pub"), path) |
| 62 | |
| 63 | _, err = sandboxFilePath(root, root, filepath.Join(root, "deploy.pub")) |
| 64 | assert.EqualError(t, err, "path must be relative to the testscript sandbox") |
| 65 | |
| 66 | _, err = sandboxFilePath(root, root, "../deploy.pub") |
| 67 | assert.EqualError(t, err, "path must stay within the testscript sandbox") |
| 68 | } |
| 69 | |
| 70 | func TestAPI(t *testing.T) { |
| 71 | var tsEnv testScriptEnv |
nothing calls this directly
no test coverage detected