Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ben Copsey
2009-02-27 14:02:34 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f569b84836da726911cfced7d105c6618e6b974a
f569b848
1 parent
2355f635
Added test for text encoding bug fix
Reinstated temporary file removal test
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
ASIHTTPRequestTests.m
ASIHTTPRequestTests.m
View file @
f569b84
...
...
@@ -74,6 +74,13 @@
[
request
start
];
BOOL
success
=
[
request
responseEncoding
]
==
[
request
defaultResponseEncoding
];
GHAssertTrue
(
success
,[
NSString
stringWithFormat
:
@"Failed to use the default string encoding"
]);
// Will return a Content-Type header with charset in the middle of the value (Fix contributed by Roman Busyghin)
url
=
[[[
NSURL
alloc
]
initWithString
:
@"http://allseeing-i.com/ASIHTTPRequest/tests/Character-Encoding/utf-16-with-type-header"
]
autorelease
];
request
=
[[[
ASIHTTPRequest
alloc
]
initWithURL
:
url
]
autorelease
];
[
request
start
];
success
=
[
request
responseEncoding
]
==
NSUnicodeStringEncoding
;
GHAssertTrue
(
success
,[
NSString
stringWithFormat
:
@"Failed to parse the content type header correctly"
]);
}
-
(
void
)
testTimeOut
...
...
@@ -136,8 +143,8 @@
NSString
*
tempPath
=
[
request
temporaryFileDownloadPath
];
GHAssertNotNil
(
tempPath
,
@"Failed to download file to temporary location"
);
//
BOOL success = (![[NSFileManager defaultManager] fileExistsAtPath:tempPath]);
//
GHAssertTrue(success,@"Failed to remove file from temporary location");
BOOL
success
=
(
!
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
tempPath
]);
GHAssertTrue
(
success
,
@"Failed to remove file from temporary location"
);
#if TARGET_OS_IPHONE
UIImage
*
image
=
[[[
UIImage
alloc
]
initWithContentsOfFile
:
path
]
autorelease
];
...
...
Please
register
or
login
to post a comment