From d01f0ceae62116443c501889f88c0f8782ec6250 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 21 Jan 2026 09:01:25 +0100 Subject: Prevent number for beiing escaped as string when generating the csv file --- tests/importCSV_test.ml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/importCSV_test.ml b/tests/importCSV_test.ml index 748c58b..c5d017a 100644 --- a/tests/importCSV_test.ml +++ b/tests/importCSV_test.ml @@ -11,6 +11,18 @@ let float_repr = in () +let significant_zero = + "leading 0" >:: fun () -> + Alcotest.(check string) + "00123" "=\"00123\"" + ImportDataTypes.Value.(to_string "C" (Content "00123")); + Alcotest.(check string) + "0.0123" "0.0123" + ImportDataTypes.Value.(to_string "C" (Content "0.0123")); + Alcotest.(check string) + "00123 A" "00123 A" + ImportDataTypes.Value.(to_string "C" (Content "00123 A")) + let test_suit = [ ( "Column A" >:: fun () -> @@ -30,6 +42,7 @@ let test_suit = in () ); float_repr; + significant_zero; ] let tests = "importCSV_test" >::: test_suit -- cgit v1.2.3