From bf4a4ba5f93803a3e6e1a5314f03f880fcdbef8e Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Wed, 15 Mar 2017 11:12:04 +0000 Subject: [PATCH] Add a regression test for #20 --- src/path.ml | 4 ++-- test/jbuild | 9 +++++++++ test/workspaces/github20/jbuild | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 test/workspaces/github20/jbuild diff --git a/src/path.ml b/src/path.ml index 2e2194b0..6e44f5b5 100644 --- a/src/path.ml +++ b/src/path.ml @@ -312,8 +312,8 @@ let extract_build_context t = match String.index_from t i '/' with | exception _ -> Some - (String.sub t ~pos:i ~len:(String.length t - i), - "") + (String.sub t ~pos:i ~len:(String.length t - i), + "") | j -> Some (String.sub t ~pos:i ~len:(j - i), diff --git a/test/jbuild b/test/jbuild index 9e357692..d499892e 100644 --- a/test/jbuild +++ b/test/jbuild @@ -1,3 +1,5 @@ +(jbuild_version 1) + (executables ((names (run)) (libraries (unix)))) @@ -8,3 +10,10 @@ (action (chdir workspaces/redirections (run ${exe:run.exe} ${bin:jbuilder} runtest --root .))))) + +(alias + ((name runtest) + (deps ((files_recursively_in workspaces/github20))) + (action + (chdir workspaces/github20 + (run ${exe:run.exe} ${bin:jbuilder} build .merlin --root .))))) diff --git a/test/workspaces/github20/jbuild b/test/workspaces/github20/jbuild new file mode 100644 index 00000000..82ff8e86 --- /dev/null +++ b/test/workspaces/github20/jbuild @@ -0,0 +1,4 @@ +(jbuild_version 1) + +(library + ((name foo)))