Skip to content

Commit a372497

Browse files
committed
Add test
1 parent d8d4d3c commit a372497

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/loadsave.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,23 @@ add_saver(format"DUMMY", :Dummy)
111111
end
112112
end
113113

114+
fn2 = string(tempname(), ".dmy")
115+
a |> save(fn2)
116+
117+
# Test for absolute paths
118+
cd(dirname(fn2)) do
119+
fnrel = basename(fn2)
120+
f = query(fnrel)
121+
@test isabspath(filename(f))
122+
@test endswith(filename(f),fn2) # TravisOSX prepends "/private"
123+
f = File(format"DUMMY", fnrel)
124+
@test !(isabspath(filename(f)))
125+
open(f) do s
126+
@test isabspath(get(filename(s)))
127+
@test endswith(get(filename(s)),fn2)
128+
end
129+
end
130+
114131
# Test IO
115132
b = load(query(fn))
116133
@test a == b

0 commit comments

Comments
 (0)