File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,20 @@ class ParseFileTests: XCTestCase { // swiftlint:disable:this type_body_length
207
207
" { \" __type \" : \" File \" , \" name \" : \" sampleData.txt \" } " )
208
208
}
209
209
210
+ func testDebugStringWithFolderInName( ) throws {
211
+ guard let sampleData = " Hello World " . data ( using: . utf8) else {
212
+ throw ParseError ( code: . unknownError, message: " Should have converted to data " )
213
+ }
214
+ let parseFile = ParseFile ( name: " myFolder/sampleData.txt " ,
215
+ data: sampleData,
216
+ metadata: [ " Testing " : " 123 " ] ,
217
+ tags: [ " Hey " : " now " ] )
218
+ XCTAssertEqual ( parseFile. debugDescription,
219
+ " { \" __type \" : \" File \" , \" name \" : \" myFolder \\ /sampleData.txt \" } " )
220
+ XCTAssertEqual ( parseFile. description,
221
+ " { \" __type \" : \" File \" , \" name \" : \" myFolder \\ /sampleData.txt \" } " )
222
+ }
223
+
210
224
func testSave( ) throws {
211
225
guard let sampleData = " Hello World " . data ( using: . utf8) else {
212
226
throw ParseError ( code: . unknownError, message: " Should have converted to data " )
You can’t perform that action at this time.
0 commit comments