Skip to content

Commit

Permalink
Tested support for paths with spaces (dafny-lang#3684)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelMayer authored Mar 3, 2023
1 parent 92ec075 commit 3c8be1e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/DafnyCore/DafnyMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public DafnyFile(string filePath, bool useStdin = false) {
// supported in .Net APIs, because it is very difficult in general
// So we will just use the absolute path, lowercased for all file systems.
// cf. IncludeComparer.CompareTo
CanonicalPath = !useStdin ? Canonicalize(filePath).AbsolutePath : "<stdin>";
CanonicalPath = !useStdin ? Canonicalize(filePath).LocalPath : "<stdin>";
filePath = CanonicalPath;

if (extension == ".dfy" || extension == ".dfyi") {
Expand Down
6 changes: 6 additions & 0 deletions Test/name with space/run.dfy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// RUN: %exits-with 0 %dafny /compile:3 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"

method Main() {
print "hello";
}
3 changes: 3 additions & 0 deletions Test/name with space/run.dfy.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

Dafny program verifier finished with 0 verified, 0 errors
hello
1 change: 1 addition & 0 deletions docs/dev/news/3683.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tested support for paths with spaces in them

0 comments on commit 3c8be1e

Please sign in to comment.