Skip to content

Commit

Permalink
Test path normalization for black box tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Octachron committed Sep 30, 2024
1 parent 5ab38e0 commit e958abc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/integrated.ml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ let diff ppf (x,y) =

(* Ignore location difference corresponding to the "??" pattern in
l1.??−end *)
(* Consider that "/" = {|\\|} to handle Windows/Unix path *)
let normalize_sep = function | '\\' -> '/' | c -> c
let (%=%) x y =
let lsx = String.length x in
let lsy = String.length y in
let rec check x posx y posy =
posx = lsx && posy = lsy
|| not (posx = lsx || posy = lsy )
&& (
if x.[posx] = y.[posy] then
if normalize_sep x.[posx] = normalize_sep y.[posy] then
check x (posx+1) y (posy+1)
else
let posx' = skip_num posx x in
Expand Down

0 comments on commit e958abc

Please sign in to comment.