@@ -537,6 +537,60 @@ test "e_low_level_lambda - Str.trim with a non-whitespace string" {
537537 try testing .expectEqualStrings ("\" hello\" " , value );
538538}
539539
540+ test "e_low_level_lambda - Str.trim_start with an empty string" {
541+ const src =
542+ \\x = Str.trim_start("")
543+ ;
544+ const value = try evalModuleAndGetString (src , 0 , test_allocator );
545+ defer test_allocator .free (value );
546+ try testing .expectEqualStrings ("\"\" " , value );
547+ }
548+
549+ test "e_low_level_lambda - Str.trim_start with a whitespace string" {
550+ const src =
551+ \\x = Str.trim_start(" ")
552+ ;
553+ const value = try evalModuleAndGetString (src , 0 , test_allocator );
554+ defer test_allocator .free (value );
555+ try testing .expectEqualStrings ("\"\" " , value );
556+ }
557+
558+ test "e_low_level_lambda - Str.trim_start with a non-whitespace string" {
559+ const src =
560+ \\x = Str.trim_start(" hello ")
561+ ;
562+ const value = try evalModuleAndGetString (src , 0 , test_allocator );
563+ defer test_allocator .free (value );
564+ try testing .expectEqualStrings ("\" hello \" " , value );
565+ }
566+
567+ test "e_low_level_lambda - Str.trim_end with an empty string" {
568+ const src =
569+ \\x = Str.trim_end("")
570+ ;
571+ const value = try evalModuleAndGetString (src , 0 , test_allocator );
572+ defer test_allocator .free (value );
573+ try testing .expectEqualStrings ("\"\" " , value );
574+ }
575+
576+ test "e_low_level_lambda - Str.trim_end with a whitespace string" {
577+ const src =
578+ \\x = Str.trim_end(" ")
579+ ;
580+ const value = try evalModuleAndGetString (src , 0 , test_allocator );
581+ defer test_allocator .free (value );
582+ try testing .expectEqualStrings ("\"\" " , value );
583+ }
584+
585+ test "e_low_level_lambda - Str.trim_end with a non-whitespace string" {
586+ const src =
587+ \\x = Str.trim_end(" hello ")
588+ ;
589+ const value = try evalModuleAndGetString (src , 0 , test_allocator );
590+ defer test_allocator .free (value );
591+ try testing .expectEqualStrings ("\" hello\" " , value );
592+ }
593+
540594test "e_low_level_lambda - List.concat with two non-empty lists" {
541595 const src =
542596 \\x = List.concat([1, 2], [3, 4])
0 commit comments