-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always print tests output relative to import/gnucobol/ #28
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,12 +40,28 @@ let target = | |
(** [pp_relloc ppf filename] prints [filename] relative to [srcdir] if the | ||
latter is a directory (prefix) of [filename]. Otherwise, prints [filename] | ||
as a whole. *) | ||
(* | ||
let pp_relloc = | ||
let srcdir_prefix = srcdir ^ Ez_file.FileOS.dir_separator_string in | ||
fun ppf s -> | ||
match EzString.chop_prefix ~prefix:srcdir_prefix s with | ||
| Some s -> Fmt.string ppf s | ||
| None -> Fmt.string ppf s | ||
let s = | ||
match EzString.chop_prefix ~prefix:srcdir_prefix s with | ||
| Some s -> s | ||
| None -> s | ||
in | ||
Fmt.string ppf s | ||
*) | ||
|
||
let pp_relloc ppf s = | ||
let path = EzString.split s '/' in | ||
let rec iter path = | ||
match path with | ||
| [] -> s | ||
| "import" :: "gnucobol" :: _ -> String.concat "/" path | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While you're at it, why not strip the Also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok for |
||
| _ :: path -> iter path | ||
in | ||
let s = iter path in | ||
Fmt.string ppf s | ||
|
||
let make_n_enter_rundir () = | ||
Superbol_testutils.Tempdir.make_n_enter "superbol-gnucobol-tests" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lefessan What was the problem of having precise source locations here?
To me the occasional need for an auto-promotion does not warrant the ugly hack used in this PR to remove the info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These locations are very handy when implementing the partial visitors, even and in particular in the tests.