mirror of
https://github.com/sbrow/envr.git
synced 2026-08-26 09:53:32 -04:00
refactor(findr): Now accepts an allocator parameter.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
import "core:mem"
|
||||
import "core:os"
|
||||
import "core:path/filepath"
|
||||
import "core:strings"
|
||||
@@ -194,3 +195,14 @@ test_search_paths_expands_tilde :: proc(t: ^testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
@(test)
|
||||
test_search_paths_no_leak :: proc(t: ^testing.T) {
|
||||
cfg := Config {
|
||||
scan_config = ScanConfig{include = make([dynamic]string, 0, 1)},
|
||||
}
|
||||
defer delete(cfg.scan_config.include)
|
||||
append(&cfg.scan_config.include, "/tmp")
|
||||
|
||||
_ = search_paths(cfg, context.allocator)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user