Commit graph

821 commits

Author SHA1 Message Date
rfm
509a29cc5b make stack symbols tests more ionformative ... check that class and method names are reported 2024-04-14 12:02:13 +01:00
rfm
6a796f145c temporary fix: revert ot using httpbin.org - a proper fix would be to use a local server controlled by the test process 2024-04-14 10:06:55 +01:00
rfm
9be55cc80a
Merge pull request #379 from svgol/refactor_NSURLConnection_tests
Refactor NSURLConnection tests
2024-04-04 13:39:07 +01:00
rfm
d573c02c9c check buildng preserves multipart order 2024-04-04 11:27:57 +01:00
Frederik Carlier
3415de14c0 Tests/base/NSURL/basic.m: Use https://gnustep.github.io instead of http://example.com
http://example.com/silly-file-name is currently returning 500 instead of 404, breaking tests.  Use https://gnustep.github.io instead.
2024-03-30 16:01:02 +00:00
Sergei Golovin
b963a79d95 update the actual mail address 2024-03-11 19:18:58 +04:00
Sergei Golovin
81108c46f5 Update Tests/base/NSURLConnection/Helpers/SimpleWebServer.m
Co-authored-by: Hugo Melder <service@hugomelder.com>
2024-03-11 19:18:58 +04:00
Sergei Golovin
2b086b335d Update Tests/base/NSURLConnection/Helpers/SimpleWebServer.m
Co-authored-by: Hugo Melder <service@hugomelder.com>
2024-03-11 19:18:58 +04:00
Sergei Golovin
1db3a482fb disable HTTPS tests if no gnutls is found 2024-03-11 19:18:58 +04:00
Sergei Golovin
70b4c87af6 fix a possible memory leak 2024-03-11 19:18:58 +04:00
Sergei Golovin
9ca1f91e2d fix memory leak 2024-03-11 19:18:58 +04:00
Sergei Golovin
0e72736b12 fix memory leak 2024-03-11 19:18:58 +04:00
Sergei Golovin
cbfcf6d8cf remove obsoleted files 2024-03-11 19:18:58 +04:00
Sergei Golovin
1284446609 release memory when done with it 2024-03-11 19:18:58 +04:00
Sergei Golovin
2d55f14799 restore connection closing on client request
listening ports are made different by one of previous commits
  so a hanging out instance is no issue for consequent tests
2024-03-11 19:18:58 +04:00
Sergei Golovin
30a8cfd2b9 simplified with one hunk of code instead of two 2024-03-11 19:18:58 +04:00
Sergei Golovin
9cb56a03a0 style tweak 2024-03-11 19:18:58 +04:00
Sergei Golovin
25f2df8374 remove commented out hunk 2024-03-11 19:18:58 +04:00
Sergei Golovin
450c545c2c fix memory leaks 2024-03-11 19:18:58 +04:00
Sergei Golovin
2ad623d0b3 use the macro AUTORELEASE instead of -autorelease 2024-03-11 19:18:58 +04:00
Sergei Golovin
da1d980d17 remove unnecessary method call 2024-03-11 19:18:58 +04:00
Sergei Golovin
d498642de5 pick the debug mode from environment 2024-03-11 19:18:57 +04:00
Sergei Golovin
1cf39479b6 update the pair certificate/key (the old pair is about to expire soon) 2024-03-11 19:18:57 +04:00
Sergei Golovin
5656be567a change ports auxilliary instances are listen to in consequent tests...
... to avoid "Address already in use"
2024-03-11 19:18:57 +04:00
Sergei Golovin
683bf4f707 use different server ports in tests to avoid errors like "address in use" 2024-03-11 19:18:57 +04:00
Sergei Golovin
151948312c remove debug log messages 2024-03-11 19:18:57 +04:00
Sergei Golovin
b60f950630 enable NSURLConnection tests with a local web server on Windows 2024-03-11 19:18:57 +04:00
Sergei Golovin
fc07538462 fix issue with HTTP socket wasn't freed at the end of request-response cycle
Connection closing by client demand doesn't work but
   it isn't important for purposes of testing so commented out
2024-03-11 19:18:57 +04:00
Sergei Golovin
a426fab700 change to use NSFileHandle instead of streams 2024-03-11 19:18:57 +04:00
Sergei Golovin
aae267ab13 update actual mail address 2024-03-11 19:18:57 +04:00
Frederik Carlier
d609147bc2 Avoid -rpath on Windows 2024-02-21 08:45:58 +01:00
rfm
6052d4e8ae adjust for difference between windows and unix 2024-02-15 13:45:39 +00:00
rfm
01573cb25e add simple tests for create/reading/remove empty file 2024-02-15 11:16:20 +00:00
rfm
98a8e6cc4d Remove spurious GSPrintf lines 2024-02-13 12:39:32 +00:00
rfm
be12e91109 locale method fixup with testcase 2024-02-11 15:03:37 +00:00
rfm
1cf38dee99 avoid a couple of compiler warnings 2024-01-29 19:38:03 +00:00
Riccardo Mottola
75fd9549ef make test user locale independent 2024-01-22 21:35:10 +01:00
Страхиња Радић
ecc5d8008c Tests/base/NSCalendar/era.m: Fix testing with non-English locale
Signed-off-by: Страхиња Радић <contact@strahinja.org>
2024-01-14 17:24:02 +01:00
ethanc8
b8239f604f Implement -[NSString enumerateSubstringsInRange:options:usingBlock] 2023-12-31 22:41:45 -06:00
hmelder
992377c6fd Replace dot notation with method call 2023-12-28 12:02:04 +01:00
hmelder
153fe3f7f0 Replace NSArray subscripting with traditional method call 2023-12-28 12:02:04 +01:00
hmelder
cb05d93167 Remove array and dictionary literals 2023-12-28 12:02:04 +01:00
hmelder
4f2cb0672c Remove redefinition in Tests/KVC/nsnull.m 2023-12-28 12:02:04 +01:00
hmelder
6f3c7ce76b KVC nsnull.m add trailing newline 2023-12-28 12:02:04 +01:00
hmelder
7b657f4777 NSPredicate: Check if predicates with NSNull work as expected 2023-12-28 12:02:04 +01:00
hmelder
4e45c968d5 Add unit test for NSNull and KVC 2023-12-28 12:02:04 +01:00
rfm
c739ac81bd Another path fix 2023-12-19 14:24:13 +00:00
Frederik Seiffert
3b3687afb3 Fix NSURLRequest test
We can't use parameters containing commas in macros.
2023-11-15 08:59:57 +01:00
Frederik Seiffert
fd7f11a134 Support deleting NSMutableURLRequest headers by calling setValue:forHTTPHeaderField: with nil value. 2023-11-14 23:04:42 +01:00
rfm
e8b67e3e0b fix for #292 2023-11-14 20:55:22 +00:00
rfm
1db5b071ee Deal with systems which don't dfefine pi in the normal place 2023-11-13 19:19:03 +00:00
Hugo Melder
ac38295f64
NSRegularExpression: Improved Error and Exception handling to match macOS behaviour (#343)
* NSRegularExpression: Match macOS error handling

* Add test cases for error handling

* NSRegularExpression: Raise an NSInvalidArgumentException instead of NSInternalInconsistencyException

* Check if NSRegularExpression throws an exception
2023-11-13 19:55:49 +01:00
rfm
ec051d1d30 Add a couple of trivial testcases to compare floats 2023-11-06 15:47:36 +00:00
rfm
1942313dea NSISO8601DateFormatter bugfix (as reported by kevinpeizner) and tweaks. 2023-10-26 14:19:06 +01:00
Richard Frith-Macdonald
f0f841c01f test for non existent directory 2023-10-10 18:12:17 +01:00
Richard Frith-Macdonald
531d3b8559 Small array keyword fixes for NSPredicate 2023-10-08 13:48:33 +01:00
Gregory John Casamento
48ccee0beb Update tests to cover removeObserver:fromObjectsAtIndexes:forKeyPath:context: 2023-10-07 20:51:47 -04:00
Gregory John Casamento
3c7e13244f Update tests to test removeObserver:forKeyPath:context method 2023-10-07 20:51:47 -04:00
Richard Frith-Macdonald
1feeb27b08 Make testcases more robust. 2023-09-17 23:35:24 -04:00
Richard Frith-Macdonald
65163ebf48 Add testcases and corrected code to check for GSMacOSXCompatibility mode
when unlocking fails.  Also put more detail in the warning message
2023-09-17 23:35:03 -04:00
Richard Frith-Macdonald
ef9ad60627 Add Yavor Doganov's patches 2023-08-01 14:46:44 +01:00
Frederik Seiffert
48c8a1a6a1 Fix NSURL path on Windows for UNC paths 2023-07-26 18:21:07 +02:00
Richard Frith-Macdonald
5fd4dd1f16 Add interface for category ... needed on sme architectures in order to
get argumentds passed correctly.
2023-07-10 21:39:49 +01:00
Frederik Seiffert
7e14fd1979 Change NSURL tests to use example.com
httpbin.org has lately been unreliable, leading to spurious test failures on CI.
2023-06-13 14:33:40 +02:00
Frederik Seiffert
df743e6d52 Add test for -[NSFileManager contentsOfDirectoryAtURL:...] 2023-04-27 10:51:15 +02:00
rfm
96a8613dbc
Merge pull request #291 from qmfrederik/fixes/nsdata-base64-empty-string
`[NSData initWithBase64EncodedString]`: Fix decoding of an empty string
2023-04-07 15:29:22 +01:00
Frederik Carlier
081f890be8 [NSData initWithBase64EncodedString]: Fix decoding of an empty string
Don't call `NSZoneRealloc` with a length of 0, but free the zone and return an empty `NSData` buffer instead.
2023-04-06 21:54:46 +00:00
Frederik Seiffert
1835f3f549 NSURLSession: mark broken test as hopeful on Windows 2023-03-11 20:22:00 +01:00
Hugo Melder
a8c421d485
Skip all NSURL* test cases using GSInetServerStream on Windows (#268)
* Mark all test cases using GSSocketStream as hopeful on win32

* Update ChangeLog

* Remove allow-test-failures flag
2022-09-27 20:21:50 +02:00
Hugo Melder
63703e0a80
Improve strict C99 support by explicitly including headers (#275)
* Explicitly include headers in config and tests

* Update ChangeLog
2022-09-15 12:24:49 +02:00
Richard Frith-Macdonald
15b97442cb Use httpbin.org rather than www.w3.org since the latter no longer supports http 2022-09-15 10:07:57 +01:00
Frederik Seiffert
179158dbc5 Fix NSPredicate test using GCC 2022-09-15 10:57:17 +02:00
Hugo Melder
8f8585405e
NSXMLParser unit test fixes (#272)
* Convert parser output to LF

* Only replace CR
2022-08-27 12:41:18 +02:00
Hugo Melder
7fd20d1ae3
NSPredicate Value Fix
* Check if object is an NSExpression object

* Fix Indentation

* Update Changelog

* Add test case
2022-08-24 18:01:30 +02:00
Richard Frith-Macdonald
68f6862ff2 Add a few testcases and make ICU dependent tests into 'hopes' 2022-08-23 21:10:21 +01:00
Hugo Melder
78d9f73a36
Allow CRLF and LF in NSXMLParser test 2022-08-23 19:18:44 +02:00
Hugo Melder
32eb5d2acd
win32: Support overlapped (asynchronous) I/O on standard streams in GSFileHandle
* win32: Support overlapped I/O on standard streams in GSFileHandle

* Add isStandardInput instance variable

* Restrict PeekConsoleInput on stdin

* Update ChangeLog
2022-08-23 18:43:14 +02:00
Hugo Melder
6b537b4a45
Detect CRLF in GSMime tests
* Detect CRLF in GSMime tests

* Allow either CRLF or LF

* Update general.m
2022-08-23 18:41:37 +02:00
Hugo Melder
5caececdcd
Update make check (#267) 2022-08-23 09:55:28 +02:00
Hugo Melder
7d6a84f4f5
Mark notANumber test case as hopeful 2022-08-19 10:58:29 +02:00
Hugo Melder
beb3e73e2f Update NSTimeZone unit test to match macOS behaviour 2022-08-11 16:34:07 +02:00
Hugo Melder
9a0b660299
Merge branch 'master' into NSTimeZone-win32-fix 2022-08-11 11:59:07 +02:00
Hugo Melder
f5a983a037
Merge pull request #256 from gnustep/msvc-test-fixes
GSTLS, NSData, NSString Unit Test Fixes on Windows MSVC
2022-08-11 11:57:21 +02:00
Hugo Melder
ca9136397d
Merge branch 'master' into NSBundle-msvc-tests 2022-08-11 09:16:06 +02:00
Hugo Melder
886a9220da
Merge pull request #257 from gnustep/nstask-msvc-test-fixes
Fix NSTask unit tests on Windows MSVC
2022-08-11 09:15:06 +02:00
Hugo Melder
f1be501f38
Merge pull request #260 from gnustep/NSXML-test-fixes
NSXML unit test and NSURL file URI fixes
2022-08-11 09:14:32 +02:00
Hugo Melder
1ea722a07a Fix NSXMLParser (strict) tests on Windows 2022-08-10 17:53:59 +02:00
Hugo Melder
ffe938c49e Update GSXML unit test to use NSURL APIs 2022-08-10 17:15:16 +02:00
Hugo Melder
a5c98620c0
Merge branch 'master' into msvc-test-fixes 2022-08-09 12:09:57 +02:00
Hugo Melder
8361596447 Add START_SET and END_SET to NSData/additions.m unit test 2022-08-09 12:05:12 +02:00
Hugo Melder
3c095da62f Windows to IANA time zone conversion: remove unsupported TIME_ZONE_ID_DAYLIGHT conversion 2022-08-07 10:55:20 +02:00
Richard Frith-Macdonald
34fca15dc9 iFix incorrect use of ObjC strings where C-strings expected. 2022-08-06 17:33:20 +01:00
Hugo Melder
f6ce98e7b5
Remove erroneous suffix. 2022-08-05 13:31:16 +02:00
Hugo Melder
f3e6ea1dd5 Remove comment 2022-08-05 12:55:46 +02:00
Hugo Melder
dd2d3f684c Conditionally use .exe suffix in executable paths in NSTask tests 2022-08-05 12:54:36 +02:00
Hugo Melder
e84fd88e6b Fix compilation of NSTask helper test files on Windows MSVC 2022-08-05 12:53:34 +02:00
Hugo Melder
2e65ee34f1 Disable tilde abbreviation test on Windows 2022-08-04 17:05:55 +02:00
Hugo Melder
98ff5d2a16 Check for UTF8String in NSProgress unit test 2022-08-04 17:05:55 +02:00
Hugo Melder
e052d5764a Change Objective-C string to cstring in NSProgress unit test 2022-08-04 17:05:55 +02:00
Hugo Melder
52b8752776 Check for nil in NSData Test 2022-08-04 17:05:55 +02:00
Hugo Melder
096f6e7fec Missing semicolon and misplaced code in GSTLS unit test 2022-08-04 17:05:55 +02:00
Hugo Melder
c70ba22b0c Remove modified GNUmakefile 2022-08-04 13:13:55 +02:00
Hugo Melder
0eae4f67de Add modified GNUmakefile 2022-08-04 13:12:05 +02:00
Hugo Melder
57233b1332 Remove .type files and add it to gitignore 2022-08-04 13:07:50 +02:00
Hugo Melder
e6789cb7ed Fix coding unit test and tolerate size differences 2022-08-04 13:05:43 +02:00
Hugo Melder
6fac511e43 Fix NSBundle test on Windows MSVC 2022-08-03 16:15:45 +02:00
Frederik Seiffert
8ca4381676 Add userInfo accessor to NSProgress. 2022-04-29 19:54:09 +02:00
Richard Frith-Macdonald
d18cba351c Add test for repeated combining characters 2022-04-07 14:34:26 +01:00
Gregory John Casamento
9cc7266931 Move era/hour/min/sec tests to it's own file. 2022-04-06 16:01:41 -04:00
Gregory John Casamento
e99dd4ec6b Add implementation for getEra:... and getHour:... method in NSCalendar. Add documentation to all methods. 2022-04-06 14:19:36 -04:00
Richard Frith-Macdonald
ae72ee4593 Fix for #243 2022-03-07 10:13:44 +00:00
Levin Li
d971813d2a Add test for zh-Hans_CN 2021-12-30 21:26:54 +08:00
Frederik Seiffert
1980f9bdf6 Extended tests for concurrent NSOperations
- trigger isFinished KVO notification when not being finished
- add test for completion handler
2021-12-27 21:52:34 +01:00
Fred Kiefer
e797128a03
Merge pull request #226 from levinli303/master
Support more DOS/Windows string encodings
2021-12-26 13:08:56 +01:00
Levin Li
fe2f41c7f1 Use encoding number values from Apple 2021-12-26 14:22:04 +08:00
Richard Frith-Macdonald
1c81bc1193 Update to have helper subtask tell master when it is ready for tests to start 2021-12-03 13:36:51 +00:00
Richard Frith-Macdonald
b7d82408a6 Make URL loading tests more reliable 2021-11-19 11:44:20 +00:00
Mads Marquart
4033ee28a8 Fix NSGetSizeAndAlignment usage
The argument order is (*sizep, *alignp), but it was often incorrectly used the other way around.
2021-11-02 10:18:05 +01:00
Mads Marquart
9684c9fda1 Add test to ensure that NSData assigns bytes and length
Specifically on initWithBytesNoCopy:length:deallocator:
2021-10-29 10:17:39 +02:00
Nuntius
b2983dc77a Workaround for the session retain loop 2021-09-04 13:07:14 +02:00
rfm
1e8ff8e628
Merge branch 'master' into nstimezone 2021-08-18 14:52:24 +01:00
Richard Frith-Macdonald
e3f558810f Remove unused test files 2021-08-18 14:36:45 +01:00
Richard Frith-Macdonald
c43ea6d474 Update for handling more future dates, and further testing. 2021-08-14 11:25:23 +01:00
Frederik Seiffert
f56d2689b6 Add test for NSFastEnumeration 2021-08-11 19:32:21 +02:00
Richard Frith-Macdonald
5162d888dc timezone updates for version2 files 2021-08-11 08:43:20 +01:00
Frederik Seiffert
852ec7be7d Tests: skip NSData gzip tests without zlib 2021-08-08 17:27:40 +02:00
Frederik Seiffert
5120069a88 Fix running tests under Windows MSVC
Remove -rpath flag when running tests with MSVC toolchain to fix build errors for tests as there is no rpath on Windows, and instead add object directory to PATH for Windows to find DLLs.
2021-08-08 17:27:40 +02:00
Frederik Seiffert
abfe4e2a04 Use native threading and locking APIs on Windows
Removes dependency on pthread library and uses fast Slim Reader/Writer (SRW) locks for NSLock/NSRecursiveLock/NSCondition/NSConditionLock as well as all internal locks. Adds GS_MUTEX_*() macros in GSPThread.h, that are being used for all internal locking instead of pthread APIs.

Also adds support for thread priorities on Windows, fixes method signature of +[NSThread setThreadPriority:] to match Apple platforms, and adds error handling in same method.
2021-07-29 14:22:27 +02:00
Richard Frith-Macdonald
49ba7d1ed1 fixup name of end of set 2021-07-19 10:54:42 +01:00
Frederik Seiffert
8f31087119 Fix compilation of NSTask test processgroup helper on Windows. 2021-07-14 10:09:45 +02:00
Frederik Seiffert
4ceea4159c Fix NSObject initialize test on Windows. 2021-07-14 10:09:45 +02:00
Frederik Seiffert
2212e08863 Fix NSJSONSerialization test on Windows.
"small" is defined as a macro in windows.h.
2021-07-14 10:09:45 +02:00
Frederik Seiffert
f492e50308 Make NSLock recursive lock test more robust.
Removed assumption that mutext ownership availability is tied to Windows platform and use config variable instead.
2021-07-14 10:09:45 +02:00
Frederik Seiffert
4a0e308383 Fix isa access in NSMethodSignature test. 2021-07-14 10:09:45 +02:00
Frederik Seiffert
1b826663f5 Add missing import statement in NSNumber test.
Fixes linker error on Windows MSVC.
2021-07-14 10:09:45 +02:00
Richard Frith-Macdonald
e2cbf5e871 Simple test of creating self-signed certificate credentials 2021-05-31 13:09:45 +01:00
Richard Frith-Macdonald
802c82cf33 Simple NSConnection client/server test tools 2021-05-31 13:08:40 +01:00
Richard Frith-Macdonald
8d75688048 Make test write a large request, not just a small one. 2021-05-19 11:07:45 +01:00
Richard Frith-Macdonald
782e7aed31 Fix for -setHTTPMaximumConnectionLifetime: 2021-05-05 12:04:28 +01:00
Richard Frith-Macdonald
9aa17b452c Merge branch 'master' of github.com:gnustep/libs-base 2021-04-14 09:15:27 +01:00
Richard Frith-Macdonald
a0fd4bde68 a few more bom tests 2021-04-14 09:14:51 +01:00
Richard Frith-Macdonald
91e071bcb4 a few tests for 24hour clock 2021-04-14 09:11:58 +01:00
Richard Frith-Macdonald
67faee95f9 a few bom generation checks 2021-04-13 17:36:46 -04:00
Frederik Seiffert
b05481a8c8 Don't resurrect GSFileHandle singletons.
It seems to be no longer possible to call -retain from -dealloc with the latest libobjc2, which was causing the tests to fail.

We are also throwing an exception in this case, which would need to be specifically caught in order for the resurrection to be of value to users, so this simply removes the -retain call and resets the singleton variables to nil in order to not have invalid pointers and for the singletons to be re-created on subsequent access.
2021-03-26 13:17:36 +01:00
Richard Frith-Macdonald
e6c387f8fd Fixup to perform a full load 2021-02-15 21:20:22 +00:00
Richard Frith-Macdonald
4b5e342c89 Check that a POST actually finishes 2021-02-15 20:41:58 +00:00
Frederik Seiffert
5c562c546f Windows MSVC fixes 2021-02-12 14:33:04 +01:00
Richard Frith-Macdonald
05542be4c7 iComment on why we have a hope 2021-02-09 21:29:40 +00:00
Richard Frith-Macdonald
309eb5fb6c Change sense of test so that success of resolving a relative link is a pass 2021-02-09 15:48:08 -05:00
Richard Frith-Macdonald
6977d9e759 Test for initialisation with nil string 2021-02-04 11:12:15 +00:00