diff options
author | Miran <narimiran@disroot.org> | 2019-01-31 08:20:00 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-01-31 08:20:00 +0100 |
commit | fa058773db018405ff218bc8ff4682a192e9131f (patch) | |
tree | 891a97f52dcdee13e8bb3e43c48c9cf91ee24ad5 /tests/dir with space | |
parent | 81e5a35d56de9fa7b3c19b6bf9c3139e6481a0ed (diff) | |
download | Nim-fa058773db018405ff218bc8ff4682a192e9131f.tar.gz |
fixes #10042 (allow spaces in import) (#10504)
This allows spaces in imports, by using the following syntax: * `import "directory with spaces" / subdir / file`, or * `import "directory with spaces/subdir/file"`
Diffstat (limited to 'tests/dir with space')
-rw-r--r-- | tests/dir with space/more spaces/mspace.nim | 1 | ||||
-rw-r--r-- | tests/dir with space/tspace.nim | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/dir with space/more spaces/mspace.nim b/tests/dir with space/more spaces/mspace.nim new file mode 100644 index 000000000..bc2c90f5e --- /dev/null +++ b/tests/dir with space/more spaces/mspace.nim @@ -0,0 +1 @@ +proc tenTimes*(x: int): int = 10*x diff --git a/tests/dir with space/tspace.nim b/tests/dir with space/tspace.nim index 59237c9a1..87a52c271 100644 --- a/tests/dir with space/tspace.nim +++ b/tests/dir with space/tspace.nim @@ -2,5 +2,9 @@ discard """ output: "Successful" """ # Test for the compiler to be able to compile a Nim file with spaces in the directory name. +# Also test if import of a directory with a space works. +import "more spaces" / mspace + +assert tenTimes(5) == 50 echo("Successful") |