From 1c4c49014851c57a883e422aa50949b6e4f81182 Mon Sep 17 00:00:00 2001 From: Robert Luke Date: Wed, 3 Aug 2016 13:57:24 +0200 Subject: [PATCH] Add tests for filename splitting --- test/miscellaneous/helper.jl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/miscellaneous/helper.jl b/test/miscellaneous/helper.jl index 494f47f9..83342881 100644 --- a/test/miscellaneous/helper.jl +++ b/test/miscellaneous/helper.jl @@ -15,14 +15,29 @@ facts("Miscellaneous") do context("File parts") do + a, b, c = fileparts("") + @fact a --> "" + @fact b --> "" + @fact c --> "" + a, b, c = fileparts("/Users/test/subdir/test-file.bdf") + @fact a --> "/Users/test/subdir/" + @fact b --> "test-file" + @fact c --> "bdf" + a, b, c = fileparts("/Users/test/subdir/test_file.bdf") @fact a --> "/Users/test/subdir/" + @fact b --> "test_file" + @fact c --> "bdf" + + a, b, c = fileparts("test-file.bdf") + @fact a --> "" @fact b --> "test-file" @fact c --> "bdf" + end + context("Find closest number index") do @fact _find_closest_number_idx([1, 2, 2.7, 3.2, 4, 3.1, 7], 3) --> 6 end end -