summaryrefslogtreecommitdiffstats
path: root/test/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
11 hoursplist: fix the (sec, usec) date API round tripGravatar Flavio Toffalini1-0/+5
plist_set_date_val stores val = sec + usec / 1000000, but plist_get_date_val splits it with a truncating cast and fabs(): *sec = (int32_t)val; val = fabs((val - (int64_t)val) * 1000000); *usec = (int32_t)val; Two results are wrong. The product is truncated, so set(5, 6) reads back as (5, 5) - 29.3% of round trips over sec in [0, 3] come back a microsecond short. And for a negative value, truncation toward zero plus fabs() give a pair that does not denote the same instant: set(-3, 250000) stores -2.75 and reads back as (-2, 750000), which the setter would store as -1.25. Every round trip with sec < 0 and usec != 0 is wrong. (int32_t)val is also undefined when the stored value is outside the int32_t range. Round the seconds down, round the fraction to microseconds carrying 1000000 into the seconds, and clamp the seconds before converting, so sec + usec / 1000000 == val to the microsecond with 0 <= usec < 1000000 - the convention the setter uses. Add test/date_val.c covering fixed cases and a sweep over sec in [-2, 2]. It fails on an unmodified tree - set(5, 6), set(-3, 250000) and set(-1, 1) all come back as different instants - and passes with this change, with make check at 44/44. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Arn4YaWtcQBDsQuJtyBmFP
21 hourstest: Add binary plist parser behavior testsGravatar Nathan Chandrasekar1-1/+6
Build small binary plists in memory and check that arrays and dicts parse correctly with 1, 2 and 3 byte object references, and that strings, extended size markers and array/dict references extending beyond the object data area into the offset table are rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29plistutil: preserve binary data on Windows standard streamsGravatar Alberto Maschietto1-2/+4
2026-02-25xplist: Enforce single root value inside <plist>Gravatar Sami Kortelainen1-2/+7
Ensure that XML property lists contain exactly one root value inside the <plist> element and reject any additional value nodes before </plist>. Add tests covering root value handling and nested CF$UID conversion behavior. Co-authored-by: Sami Kortelainen <sami.kortelainen@piceasoft.com> Co-authored-by: Nikias Bassen <nikias@gmx.li>
2023-04-21test: Fix tests for distcheckGravatar Nikias Bassen1-0/+1
2023-04-21Fix buildGravatar Nikias Bassen1-0/+1
2023-04-21Add C++ interface testGravatar Sébastien Gonzalve1-0/+10
2023-01-16Rename PLIST_UINT to PLIST_INT and add plist_new_int() and plist_get_int_val()Gravatar Nikias Bassen1-0/+5
This properly supports getting and setting signed or unsigned integer values. Also, a new helper function plist_int_val_is_negative() was added to determine if a given #PLIST_INT node has a negative value or not. The old type PLIST_UINT is defined as a macro with the value of PLIST_INT for backwards compatibility. This commit also adds int vs. uint support to the C++ interface, and the python bindings in a hopefully useful way.
2023-01-08Add support for OpenStep plist formatGravatar Nikias Bassen1-3/+15
2022-02-07test: Add int64 min/max testcase for JSON parserGravatar Nikias Bassen1-2/+4
2022-01-25test: Rename json test files to .jsonGravatar Nikias Bassen1-1/+2
2022-01-25test: Add additional JSON test caseGravatar Nikias Bassen1-0/+1
2021-12-23Add support for JSON formatGravatar Nikias Bassen1-3/+12
2021-12-23test: Add PLIST_UID test caseGravatar Nikias Bassen1-3/+9
2020-06-14Add API version to library and pkgconfig file for proper linkingGravatar Nikias Bassen1-2/+2
2020-06-09Unfold automake variables into multiple lines for maintainabilityGravatar Martin Szulecki1-4/+14
2019-05-16test: Merge *cmp.test into *.test to allow parallel testingGravatar Nikias Bassen1-6/+0
2017-04-20test: Add missing test files to Makefile.am/EXTRA_DISTGravatar Christophe Fergeau1-1/+42
2017-04-20test: Fix wrong filename in EXTRA_DIST entry of Makefile.amGravatar Nikias Bassen1-1/+1
2017-02-01test: Add test cases for different bplist offset and reference sizesGravatar Nikias Bassen1-0/+2
2017-01-02test: Add some more test cases for various valid and invalid contentGravatar Nikias Bassen1-1/+4
2017-01-02test: Add new test case for dictionaries with empty keysGravatar Nikias Bassen1-1/+2
2017-01-02test: Add new test case for entitiesGravatar Nikias Bassen1-1/+2
2016-09-19test: Add additional test case to check extended date rangeGravatar Nikias Bassen1-0/+1
2016-06-29test: Add another test case for signed/unsigned (multiple) integersGravatar Nikias Bassen1-0/+1
Apart from testing the actual integer signed vs. unsigned value storage and conversion, this test will check that the binary plist optimization is not re-using existing values. Basically it will test the fix that was introduced with commit acd226d1f71a78dd23b47a9a5c4ca8cf8068d509.
2015-02-05test: Add more test cases covering binary plist issuesGravatar Nikias Bassen1-2/+5
2014-10-03Avoid exporting non-public symbolsGravatar Nikias Bassen1-1/+1
2014-06-13test: Fix make clean in relation with out-of-tree build directoryGravatar Martin Szulecki1-1/+1
2014-05-27test: Fix clean target to remove all generated filesGravatar Martin Szulecki1-1/+1
2014-05-23test: Add test cases for integer nodesGravatar Nikias Bassen1-2/+5
2014-05-23test: Add data/7.plist to extra_dist targetGravatar Nikias Bassen1-1/+1
2014-04-01test: Add new timezone testsGravatar Nikias Bassen1-1/+3
2014-02-13Replace some LDADD references to use $(top_builddir) for distcheckGravatar Martin Szulecki1-2/+2
2014-02-13fix make distcheckGravatar Nikias Bassen1-0/+6
2013-12-13change build system to autotoolsGravatar Nikias Bassen1-0/+25