<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libubox/tests/shunit2, branch master</title>
<subtitle>C utility functions for OpenWrt</subtitle>
<id>https://git-03.infra.openwrt.org/project/libubox/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/project/libubox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/'/>
<updated>2026-02-12T15:57:28Z</updated>
<entry>
<title>libubox: add anonymous strings, ints, et al in arrays</title>
<updated>2026-02-12T15:57:28Z</updated>
<author>
<name>Philip Prindeville</name>
</author>
<published>2023-09-15T18:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=8c7b489daa029b3841584f6ac76e2a0b68d74ef3'/>
<id>urn:sha1:8c7b489daa029b3841584f6ac76e2a0b68d74ef3</id>
<content type='text'>
You can have a "name" in an array member without an associated value.

Signed-off-by: Philip Prindeville &lt;philipp@redfish-solutions.com&gt;
Link: https://github.com/openwrt/libubox/pull/12
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>libubox: Add ability to find ordinal position inside a table</title>
<updated>2025-12-08T13:59:11Z</updated>
<author>
<name>Philip Prindeville</name>
</author>
<published>2025-11-14T19:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=7928f1711703767b0ac5ce916c7231d0e1af1ca2'/>
<id>urn:sha1:7928f1711703767b0ac5ce916c7231d0e1af1ca2</id>
<content type='text'>
When adding anonymous objects to an array, the only way to select
those objects (as in "json_select", i.e. moving the cursor) is to
select them via their ordinality.

This function returns a selectable index to those objects.

Signed-off-by: Philip Prindeville &lt;philipp@redfish-solutions.com&gt;
Link: https://github.com/openwrt/libubox/pull/33
Signed-off-by: Álvaro Fernández Rojas &lt;noltari@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: shunit2: add test for _jshn_append via JSON script</title>
<updated>2025-11-17T18:31:02Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2025-11-13T11:56:15Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=a3ff29ef93df3ec6e40447f6f4e029ebd07a29f1'/>
<id>urn:sha1:a3ff29ef93df3ec6e40447f6f4e029ebd07a29f1</id>
<content type='text'>
Add another test which verifies _jshn_append leading space fix in commit
82cb5fd66af9 ("libubox: Drop extraneous space when appending values to
variable") by appending keys to JSON objects, making sure there is no
leading space on the first key when adding second key.

  test_jshn_append_via_json_script
  ASSERT:expected:&lt;first&gt; but was:&lt; first&gt;
  ASSERT:expected:&lt;first second&gt; but was:&lt; first second&gt;

Tests: #16
Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
Link: https://github.com/openwrt/libubox/pull/30
Signed-off-by: Álvaro Fernández Rojas &lt;noltari@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: shunit2: add dump and setters coverage</title>
<updated>2025-11-17T18:07:04Z</updated>
<author>
<name>Philip Prindeville</name>
</author>
<published>2025-11-17T17:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=440b4e988f39ecb7371fe36fd85f96a0eef23465'/>
<id>urn:sha1:440b4e988f39ecb7371fe36fd85f96a0eef23465</id>
<content type='text'>
Exercise json_dump and json_add_* functions.

Signed-off-by: Philip Prindeville &lt;philipp@redfish-solutions.com&gt;
Link: https://github.com/openwrt/libubox/pull/35
Signed-off-by: Álvaro Fernández Rojas &lt;noltari@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: shunit2: add test for _jshn_append leading space fix</title>
<updated>2025-11-13T10:47:22Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2025-11-13T10:38:41Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=240d2d5ef58b7d5637604c0f687d1efbff549f2e'/>
<id>urn:sha1:240d2d5ef58b7d5637604c0f687d1efbff549f2e</id>
<content type='text'>
Verifies the fix in commit 2065c3909935 ("libubox: Drop extraneous space
when appending values to variable") that prevents leading spaces when
appending to empty variables.

 test_jshn_append_no_leading_space
 ASSERT:expected:&lt;foo&gt; but was:&lt; foo&gt;
 ASSERT:expected:&lt;first second&gt; but was:&lt; first second&gt;

References: #16
Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
<entry>
<title>tests: include json script shunit2 based testing</title>
<updated>2020-01-12T18:17:17Z</updated>
<author>
<name>Petr Štetiar</name>
</author>
<published>2020-01-08T18:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/libubox/commit/?id=379cd33d19920165d4cccc562d8da8c2702087b9'/>
<id>urn:sha1:379cd33d19920165d4cccc562d8da8c2702087b9</id>
<content type='text'>
Include shunit2 based tests into unit testing pipeline until
(eventually) it's converted to cram based unit tests.

Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
</content>
</entry>
</feed>
