<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libplist/test/Makefile.am, branch 2.8.1</title>
<subtitle>Library to handle Apple Property List format files in binary or XML</subtitle>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/'/>
<entry>
<title>plist: fix the (sec, usec) date API round trip</title>
<updated>2026-11-06T09:29:06+00:00</updated>
<author>
<name>Flavio Toffalini</name>
</author>
<published>2026-10-26T09:03:57+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=1d3b54c784da260f71d885f5f560d69c211a645e'/>
<id>1d3b54c784da260f71d885f5f560d69c211a645e</id>
<content type='text'>
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 &lt; 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 &lt;= usec &lt;
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 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01Arn4YaWtcQBDsQuJtyBmFP
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt; 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 &lt;= usec &lt;
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 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01Arn4YaWtcQBDsQuJtyBmFP
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Add binary plist parser behavior tests</title>
<updated>2026-11-05T22:46:59+00:00</updated>
<author>
<name>Nathan Chandrasekar</name>
</author>
<published>2026-10-18T00:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=70a64c23c9d77b114dcc71e70e69aa8868693f3f'/>
<id>70a64c23c9d77b114dcc71e70e69aa8868693f3f</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>plistutil: preserve binary data on Windows standard streams</title>
<updated>2026-09-29T15:00:18+00:00</updated>
<author>
<name>Alberto Maschietto</name>
</author>
<published>2026-09-07T21:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=fba74cf8bd9696b9b7f42a8cbb9e16dd065b0a83'/>
<id>fba74cf8bd9696b9b7f42a8cbb9e16dd065b0a83</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>xplist: Enforce single root value inside &lt;plist&gt;</title>
<updated>2026-02-25T01:27:00+00:00</updated>
<author>
<name>Sami Kortelainen</name>
</author>
<published>2026-02-25T01:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=6e03a1df6d1aa87c8f9e2b35f1a2ca60feca1c0e'/>
<id>6e03a1df6d1aa87c8f9e2b35f1a2ca60feca1c0e</id>
<content type='text'>
Ensure that XML property lists contain exactly one root value inside the &lt;plist&gt; element and reject any additional value nodes before &lt;/plist&gt;.

Add tests covering root value handling and nested CF$UID conversion behavior.

Co-authored-by: Sami Kortelainen &lt;sami.kortelainen@piceasoft.com&gt;
Co-authored-by: Nikias Bassen &lt;nikias@gmx.li&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that XML property lists contain exactly one root value inside the &lt;plist&gt; element and reject any additional value nodes before &lt;/plist&gt;.

Add tests covering root value handling and nested CF$UID conversion behavior.

Co-authored-by: Sami Kortelainen &lt;sami.kortelainen@piceasoft.com&gt;
Co-authored-by: Nikias Bassen &lt;nikias@gmx.li&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Fix tests for distcheck</title>
<updated>2023-04-21T14:04:40+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2023-04-21T14:04:40+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=bddb061bd64692b3d1287064f8991c8c276528b6'/>
<id>bddb061bd64692b3d1287064f8991c8c276528b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix build</title>
<updated>2023-04-21T10:51:28+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2023-04-21T10:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=6e65e1bfb487a893a4d8dbd2a812686677ad784d'/>
<id>6e65e1bfb487a893a4d8dbd2a812686677ad784d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add C++ interface test</title>
<updated>2023-04-21T10:40:18+00:00</updated>
<author>
<name>Sébastien Gonzalve</name>
</author>
<published>2023-04-21T10:40:18+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=25ace1e8cb7f9a464c29dd2ce80cd68104d54f84'/>
<id>25ace1e8cb7f9a464c29dd2ce80cd68104d54f84</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename PLIST_UINT to PLIST_INT and add plist_new_int() and plist_get_int_val()</title>
<updated>2023-01-16T03:25:52+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2023-01-16T03:25:52+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=d886885b0ec2506fa2caf0986a3d0e496fea91c2'/>
<id>d886885b0ec2506fa2caf0986a3d0e496fea91c2</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for OpenStep plist format</title>
<updated>2023-01-08T04:29:22+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2023-01-08T04:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=60d291941fadb72b66d11502710add5899e21a2d'/>
<id>60d291941fadb72b66d11502710add5899e21a2d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Add int64 min/max testcase for JSON parser</title>
<updated>2022-02-07T08:36:16+00:00</updated>
<author>
<name>Nikias Bassen</name>
</author>
<published>2022-02-07T08:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.sukimashita.com/libplist.git/commit/?id=b8e9fedc5f1694164707c810dd9dae3f6468edb6'/>
<id>b8e9fedc5f1694164707c810dd9dae3f6468edb6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
