mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 03:27:48 +00:00
os: testTempDir: now that we have os.ReadDir, bring back one use of it in a test
This commit is contained in:
@@ -119,6 +119,13 @@ func testTempDir(t *testing.T) {
|
||||
if !fi.IsDir() {
|
||||
t.Errorf("dir %q is not a dir", dir)
|
||||
}
|
||||
files, err := os.ReadDir(dir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(files) > 0 {
|
||||
t.Errorf("unexpected %d files in TempDir: %v", len(files), files)
|
||||
}
|
||||
|
||||
glob := filepath.Join(dir, "*.txt")
|
||||
if _, err := filepath.Glob(glob); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user