go/src/testing
Achille Roussel 6dc2d2aa6b testing/fstest: fix the Glob test when dir entries are out of order
This change adds a test highlighting an issue with the fstest.TestFS
test suite which occurred when the fs.FS implementation would expose
directories returning unordered directory entries from their ReadDir
method.

--- FAIL: TestShuffledFS (0.00s)
    testfs_test.go:76: testing fs.Sub(fsys, tmp): TestFS found errors:
        .: Glob(`*e*`): wrong output:
        extra: one
        missing: one

The issue came from having the wrong variable passed to the checkGlob
method. There are two variables named list and list2, the latter is
sorted, and the checkGlob method expects a sorted list but was passed
list instead of list2.

Change-Id: I5e49dccf14077e7d1fee51687eb6a5eeb0330c16
Reviewed-on: https://go-review.googlesource.com/c/go/+/503175
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2023-06-16 18:21:40 +00:00
..
fstest testing/fstest: fix the Glob test when dir entries are out of order 2023-06-16 18:21:40 +00:00
internal/testdeps
iotest
quick database/sql,testing/quick: use reflect.Value.SetZero 2023-04-04 07:16:34 +00:00
slogtest log/slog: built-in handler constructors take options as a second arg 2023-05-04 18:32:54 +00:00
allocs.go
allocs_test.go
benchmark.go Revert "testing: only report subtest races once" 2023-05-24 17:35:45 +00:00
benchmark_test.go testing: add an example showcasing B.RunParallel with B.ReportMetric 2022-10-07 17:49:17 +00:00
cover.go cmd/go,testing: re-implement testing.Coverage 2023-05-23 11:37:31 +00:00
example.go std: fix various nilness findings 2023-04-20 01:07:29 +00:00
export_test.go
flag_test.go testing: quote -test.v=test2json output when logging it 2023-03-23 19:50:22 +00:00
fuzz.go all: fix typos in go file comments 2023-01-09 15:34:31 +00:00
helper_test.go
helperfuncs_test.go
match.go
match_test.go
newcover.go cmd/go,testing: re-implement testing.Coverage 2023-05-23 11:37:31 +00:00
panic_test.go testing: in TestRacyOutput, ensure that the Run calls complete before cleanup 2022-11-16 17:22:19 +00:00
run_example.go all: add wasip1 support 2023-04-11 20:56:32 +00:00
run_example_wasm.go all: add wasip1 support 2023-04-11 20:56:32 +00:00
sub_test.go testing: in TestRacyOutput, ensure that the Run calls complete before cleanup 2022-11-16 17:22:19 +00:00
testing.go Revert "testing: only report subtest races once" 2023-05-24 17:35:45 +00:00
testing_other.go
testing_test.go Revert "testing: only report subtest races once" 2023-05-24 17:35:45 +00:00
testing_windows.go