Skip to content

Commit

Permalink
Progress on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Jun 14, 2024
1 parent b98ea4f commit c6f63ad
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/search_exp_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ module Alco = struct
[ ([ at "-"; at "-"; at " "; at "-" ],
[ et "-" false true; et "-" true false; et "-" false false ])
];
test_exp "\\'abcd"
[ ([ at "'"; at "abcd" ],
[ et "'" false true; et "abcd" true false ])
];
test_exp "'abcd"
[ ([ atm `Exact; at "abcd" ],
[ et ~m:`Exact "abcd" false false ])
Expand All @@ -448,10 +452,18 @@ module Alco = struct
[ ([ at "'"; at " "; at "abcd" ],
[ et "'" false false; et "abcd" false false ])
];
test_exp "\\^abcd"
[ ([ at "^"; at "abcd" ],
[ et "^" false true; et "abcd" true false ])
];
test_exp "^abcd"
[ ([ atm `Prefix; at "abcd" ],
[ et ~m:`Prefix "abcd" false false ])
];
test_exp "^ abcd"
[ ([ at "^"; at " "; at "abcd" ],
[ et "^" false false; et "abcd" false false ])
];
test_exp "^ abcd"
[ ([ atm `Prefix; at " "; at "abcd" ],
[ et "^" false false; et "abcd" false false ])
Expand All @@ -460,14 +472,22 @@ module Alco = struct
[ ([ at "abcd"; atm `Suffix ],
[ et ~m:`Suffix "abcd" false false ])
];
test_exp "abcd $"
[ ([ at "abcd"; at " "; at "$" ],
[ et "abcd" false false; et "$" false false ])
];
test_exp "abcd $"
[ ([ at "abcd"; at " "; atm `Suffix ],
[ et "abcd" false false; et "$" false false ])
];
test_exp "''abcd"
[ ([ atm `Exact; at "'"; at "abcd" ],
[ ([ atm `Exact; atm `Exact; at "abcd" ],
[ et ~m:`Exact "'" false true; et ~m:`Exact "abcd" true false ])
];
test_exp "^^abcd"
[ ([ atm `Prefix; at "^"; at "abcd" ],
[ et ~m:`Exact "^" false true; et ~m:`Prefix "abcd" true false ])
];
test_exp "abcd$$"
[ ([ at "abcd"; at "$"; atm `Suffix ],
[ et ~m:`Suffix "abcd" false true; et ~m:`Exact "$" true false ])
Expand Down

0 comments on commit c6f63ad

Please sign in to comment.