(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestTmpDir(t *testing.T) { |
| 11 | dir := NewTmpDir("test_prefix") |
| 12 | assert.NotEmpty(t, dir) |
| 13 | |
| 14 | assert.Contains(t, dir.Path(), "test_prefix") |
| 15 | testFilePath := dir.Path("testfile.txt") |
| 16 | assert.Contains(t, testFilePath, "test_prefix") |
| 17 | assert.Contains(t, testFilePath, "testfile.txt") |
| 18 | assert.True(t, strings.HasPrefix(testFilePath, dir.Path())) |
| 19 | } |