diff options
author | Nadrieril | 2024-05-24 16:20:26 +0200 |
---|---|---|
committer | Nadrieril | 2024-05-24 16:31:32 +0200 |
commit | 0ebfa7a15f4d7218389488ff8a92206c0d6642ec (patch) | |
tree | 53f04658b99d039faeb67c24af21bca9e35b7870 /tests/test_runner/run_test.ml | |
parent | c4af12c1c34406720d8173f2972d4cf1f42f8f5b (diff) |
runner: Allow filenames with dashes
Diffstat (limited to 'tests/test_runner/run_test.ml')
-rw-r--r-- | tests/test_runner/run_test.ml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_runner/run_test.ml b/tests/test_runner/run_test.ml index 25efbcfd..3bda4e29 100644 --- a/tests/test_runner/run_test.ml +++ b/tests/test_runner/run_test.ml @@ -167,6 +167,7 @@ module Input = struct (* Given a path to a rust file or crate, gather the details and options about how to build the test. *) let build (path : string) : t = let name = Filename.remove_extension (Filename.basename path) in + let name = Str.global_replace (Str.regexp "-") "_" name in let kind = if Sys_unix.is_file_exn path then SingleFile else if Sys_unix.is_directory_exn path then Crate |