tests: shunit2: add test for _jshn_append via JSON script
authorPetr Štetiar <[email protected]>
Thu, 13 Nov 2025 11:56:15 +0000 (11:56 +0000)
committerÁlvaro Fernández Rojas <[email protected]>
Mon, 17 Nov 2025 18:31:02 +0000 (19:31 +0100)
commita3ff29ef93df3ec6e40447f6f4e029ebd07a29f1
treecc4ab8b2bb324ade8334d1ea9f66d0b098115647
parent440b4e988f39ecb7371fe36fd85f96a0eef23465
tests: shunit2: add test for _jshn_append via JSON script

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:<first> but was:< first>
  ASSERT:expected:<first second> but was:< first second>

Tests: #16
Signed-off-by: Petr Štetiar <[email protected]>
Link: https://github.com/openwrt/libubox/pull/30
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
tests/shunit2/tests.sh