@@ -9,7 +9,7 @@ object ExampleTests extends TestSuite {
99 test(" splash" ) - TestUtil .prep { wd =>
1010 if (Unix ()) {
1111 // Make sure working directory exists and is empty
12- val wd = os.pwd / " out" / " splash"
12+ val wd = os.pwd / " out/ splash"
1313 os.remove.all(wd)
1414 os.makeDir.all(wd)
1515
@@ -95,8 +95,8 @@ object ExampleTests extends TestSuite {
9595
9696 // ignore multiline (second file) because its size varies
9797 largestThree.filterNot(_._2.last == " Multi Line.txt" ) ==> Seq (
98- (711 , wd / " misc" / " binary.png" ),
99- (22 , wd / " folder1" / " one.txt" )
98+ (711 , wd / " misc/ binary.png" ),
99+ (22 , wd / " folder1/ one.txt" )
100100 )
101101 }
102102
@@ -115,9 +115,9 @@ object ExampleTests extends TestSuite {
115115 }
116116 test(" comparison" ) {
117117
118- os.remove.all(os.pwd / " out" / " scratch" / " folder" / " thing" / " file" )
118+ os.remove.all(os.pwd / " out/ scratch/ folder/ thing/ file" )
119119 os.write(
120- os.pwd / " out" / " scratch" / " folder" / " thing" / " file" ,
120+ os.pwd / " out/ scratch/ folder/ thing/ file" ,
121121 " Hello!" ,
122122 createFolders = true
123123 )
@@ -135,16 +135,16 @@ object ExampleTests extends TestSuite {
135135 }
136136 removeAll(" out/scratch/folder/thing" )
137137
138- assert(os.list(os.pwd / " out" / " scratch" / " folder" ).toSeq == Nil )
138+ assert(os.list(os.pwd / " out/ scratch/ folder" ).toSeq == Nil )
139139
140140 os.write(
141- os.pwd / " out" / " scratch" / " folder" / " thing" / " file" ,
141+ os.pwd / " out/ scratch/ folder/ thing/ file" ,
142142 " Hello!" ,
143143 createFolders = true
144144 )
145145
146- os.remove.all(os.pwd / " out" / " scratch" / " folder" / " thing" )
147- assert(os.list(os.pwd / " out" / " scratch" / " folder" ).toSeq == Nil )
146+ os.remove.all(os.pwd / " out/ scratch/ folder/ thing" )
147+ assert(os.list(os.pwd / " out/ scratch/ folder" ).toSeq == Nil )
148148 }
149149
150150 test(" constructingPaths" ) {
@@ -155,13 +155,13 @@ object ExampleTests extends TestSuite {
155155 val wd = os.pwd
156156
157157 // A path nested inside `wd`
158- wd / " folder" / " file"
158+ wd / " folder/ file"
159159
160160 // A path starting from the root
161- os.root / " folder" / " file"
161+ os.root / " folder/ file"
162162
163163 // A path with spaces or other special characters
164- wd / " My Folder" / " My File.txt"
164+ wd / " My Folder/ My File.txt"
165165
166166 // Up one level from the wd
167167 wd / os.up
@@ -171,17 +171,17 @@ object ExampleTests extends TestSuite {
171171 }
172172 test(" newPath" ) {
173173
174- val target = os.pwd / " out" / " scratch"
174+ val target = os.pwd / " out/ scratch"
175175 }
176176 test(" relPaths" ) {
177177
178178 // The path "folder/file"
179- val rel1 = os.rel / " folder" / " file"
180- val rel2 = os.rel / " folder" / " file"
179+ val rel1 = os.rel / " folder/ file"
180+ val rel2 = os.rel / " folder/ file"
181181
182182 // The relative difference between two paths
183- val target = os.pwd / " out" / " scratch" / " file"
184- assert((target relativeTo os.pwd) == os.rel / " out" / " scratch" / " file" )
183+ val target = os.pwd / " out/ scratch/ file"
184+ assert((target relativeTo os.pwd) == os.rel / " out/ scratch/ file" )
185185
186186 // `up`s get resolved automatically
187187 val minus = os.pwd relativeTo target
@@ -195,66 +195,66 @@ object ExampleTests extends TestSuite {
195195 test(" subPaths" ) {
196196
197197 // The path "folder/file"
198- val sub1 = os.sub / " folder" / " file"
199- val sub2 = os.sub / " folder" / " file"
198+ val sub1 = os.sub / " folder/ file"
199+ val sub2 = os.sub / " folder/ file"
200200
201201 // The relative difference between two paths
202- val target = os.pwd / " out" / " scratch" / " file"
203- assert((target subRelativeTo os.pwd) == os.sub / " out" / " scratch" / " file" )
202+ val target = os.pwd / " out/ scratch/ file"
203+ assert((target subRelativeTo os.pwd) == os.sub / " out/ scratch/ file" )
204204
205205 // Converting os.RelPath to os.SubPath
206- val rel3 = os.rel / " folder" / " file"
206+ val rel3 = os.rel / " folder/ file"
207207 val sub3 = rel3.asSubPath
208208
209209 // `up`s are not allowed in sub paths
210210 intercept[Exception ](os.pwd subRelativeTo target)
211211 }
212212 test(" relSubPathEquality" ) {
213213 assert(
214- (os.sub / " hello" / " world" ) == (os.rel / " hello" / " world" ),
214+ (os.sub / " hello/ world" ) == (os.rel / " hello/ world" ),
215215 os.sub == os.rel
216216 )
217217 }
218218 test(" relPathCombine" ) {
219- val target = os.pwd / " out" / " scratch" / " file"
219+ val target = os.pwd / " out/ scratch/ file"
220220 val rel = target relativeTo os.pwd
221- val newBase = os.root / " code" / " server"
222- assert(newBase / rel == os.root / " code" / " server" / " out" / " scratch" / " file" )
221+ val newBase = os.root / " code/ server"
222+ assert(newBase / rel == os.root / " code/ server/ out/ scratch/ file" )
223223 }
224224 test(" subPathCombine" ) {
225- val target = os.pwd / " out" / " scratch" / " file"
225+ val target = os.pwd / " out/ scratch/ file"
226226 val sub = target subRelativeTo os.pwd
227- val newBase = os.root / " code" / " server"
227+ val newBase = os.root / " code/ server"
228228 assert(
229- newBase / sub == os.root / " code" / " server" / " out" / " scratch" / " file" ,
230- sub / sub == os.sub / " out" / " scratch" / " file" / " out" / " scratch" / " file"
229+ newBase / sub == os.root / " code/ server/ out/ scratch/ file" ,
230+ sub / sub == os.sub / " out/ scratch/ file/ out/ scratch/ file"
231231 )
232232 }
233233 test(" pathUp" ) {
234- val target = os.root / " out" / " scratch" / " file"
235- assert(target / os.up == os.root / " out" / " scratch" )
234+ val target = os.root / " out/ scratch/ file"
235+ assert(target / os.up == os.root / " out/ scratch" )
236236 }
237237 test(" relPathUp" ) {
238- val target = os.rel / " out" / " scratch" / " file"
239- assert(target / os.up == os.rel / " out" / " scratch" )
238+ val target = os.rel / " out/ scratch/ file"
239+ assert(target / os.up == os.rel / " out/ scratch" )
240240 }
241241 test(" relPathUp" ) {
242- val target = os.sub / " out" / " scratch" / " file"
243- assert(target / os.up == os.sub / " out" / " scratch" )
242+ val target = os.sub / " out/ scratch/ file"
243+ assert(target / os.up == os.sub / " out/ scratch" )
244244 }
245245 test(" canonical" ) {
246246 if (Unix ()) {
247247
248- assert((os.root / " folder" / " file" / os.up).toString == " /folder" )
248+ assert((os.root / " folder/ file" / os.up).toString == " /folder" )
249249 // not "/folder/file/.."
250250
251- assert((os.rel / " folder" / " file" / os.up).toString == " folder" )
251+ assert((os.rel / " folder/ file" / os.up).toString == " folder" )
252252 // not "folder/file/.."
253253 }
254254 }
255255 test(" findWc" ) {
256256
257- val wd = os.pwd / " os" / " test" / " resources" / " test"
257+ val wd = os.pwd / " os/ test/ resources/ test"
258258
259259 // find . -name '*.txt' | xargs wc -l
260260 val lines = os.walk(wd)
0 commit comments