Skip to content

Commit

Permalink
[test] [compiler] Fix replacement text when FCC_TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
ejgallego committed Nov 11, 2023
1 parent ea3550e commit 85bbc52
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion compiler/driver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let coq_init ~debug =

let replace_test_path exp message =
let home_re = Str.regexp (exp ^ ".*$") in
Str.global_replace home_re "coqlib is at: [TEST_PATH]" message
Str.global_replace home_re (exp ^ "[TEST_PATH]") message

let sanitize_paths message =
match Sys.getenv_opt "FCC_TEST" with
Expand Down
48 changes: 24 additions & 24 deletions test/compiler/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ Describe the project
$ fcc --root proj1
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]

Compile a single file
$ fcc --root proj1 proj1/a.v
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]
[message] compiling file proj1/a.v

$ ls proj1
Expand All @@ -37,12 +37,12 @@ Compile a dependent file
$ fcc --root proj1 proj1/b.v
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]
[message] compiling file proj1/b.v

$ ls proj1
Expand All @@ -58,12 +58,12 @@ Compile both files
$ fcc --root proj1 proj1/a.v proj1/b.v
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]
[message] compiling file proj1/a.v

[message] compiling file proj1/b.v
Expand All @@ -81,12 +81,12 @@ Compile a dependent file without the dep being built
$ fcc --root proj1 proj1/b.v
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]
[message] compiling file proj1/b.v

$ ls proj1
Expand Down Expand Up @@ -127,20 +127,20 @@ Use two workspaces
$ fcc --root proj1 --root proj2 proj1/a.v proj2/b.v
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]
[message] compiling file proj1/a.v

[message] compiling file proj2/b.v
Expand All @@ -154,12 +154,12 @@ Load the example plugin
$ fcc --plugin=coq-lsp.plugin.example --root proj1 proj1/a.v
[message] Configuration loaded from Command-line arguments
- coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ coqcorelib is at: [TEST_PATH]
- Modules [Coq.Init.Prelude] will be loaded by default
- 2 Coq path directory bindings in scope; 22 Coq plugin directory bindings in scope
- ocamlpath wasn't overriden
+ coqlib is at: [TEST_PATH]
+ coqlib is at: [TEST_PATH]
+ findlib config: [TEST_PATH]
+ findlib default location: [TEST_PATH]
[message] compiling file proj1/a.v

[example plugin] file checking for proj1/a.v was completed

0 comments on commit 85bbc52

Please sign in to comment.