File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ trying to infer the format from `filename`.
54
54
save (s:: Union{AbstractString,IO} , data... ; options... ) =
55
55
save (query (s), data... ; options... )
56
56
57
+ function save (s:: Union{AbstractString,IO} ; options... )
58
+ data -> save (s, data; options... )
59
+ end
60
+
57
61
# Forced format
58
62
function save {sym} (df:: Type{DataFormat{sym}} , f:: AbstractString , data... ; options... )
59
63
libraries = applicable_savers (df)
Original file line number Diff line number Diff line change @@ -111,6 +111,23 @@ add_saver(format"DUMMY", :Dummy)
111
111
end
112
112
end
113
113
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
+
114
131
# Test IO
115
132
b = load (query (fn))
116
133
@test a == b
You can’t perform that action at this time.
0 commit comments