Skip to content

Commit

Permalink
Add test for importPaths ".."
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberShadow committed May 10, 2023
1 parent f65fbec commit b45838d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/issue2637-parent-directory.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e

. $(dirname "${BASH_SOURCE[0]}")/common.sh
cd "${CURR_DIR}/issue2637-parent-directory"
test ! -e bad || rmdir bad
mkdir -m 000 bad
trap 'rmdir bad' EXIT

(
cd pkg
$DUB run
)
Empty file.
1 change: 1 addition & 0 deletions test/issue2637-parent-directory/pkg/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/pkg
4 changes: 4 additions & 0 deletions test/issue2637-parent-directory/pkg/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name "pkg"
targetType "executable"
sourceFiles "prog.d"
importPaths ".."
3 changes: 3 additions & 0 deletions test/issue2637-parent-directory/pkg/mod.di
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module pkg.mod;

enum message = "Hello";
9 changes: 9 additions & 0 deletions test/issue2637-parent-directory/pkg/prog.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module pkg.prog;

import std.stdio;
import pkg.mod;

void main()
{
writeln(message);
}

0 comments on commit b45838d

Please sign in to comment.