mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-28 03:34:05 -06:00
d9623b0ad1
Add tests for libgnucash/scm/utilities.scm functions - tests for list<->vec - tests for gnc:substring-replace - tests for gnc:substring-replace-from-to The latter confirms that the comment before the function definition is *incorrect* - it describes that substring-replace-from-to will start from the 2nd substring for the first substitution, and performs 2 substitutions. However the comment illustrates only 1 substitution. The test suite performs the test according to code behaviour, rather than the comment. This issue is moot in practice because the end-after is always called with negative in the code base. original comment: ;; gnc:substring-replace-from-to ;; same as gnc:substring-replace extended by: ;; start: from which occurrence onwards the replacement shall start ;; end-after: max. number times the replacement should executed ;; ;; Example: (gnc:substring-replace-from-to "foobarfoobarfoobar" "bar" "xyz" 2 2) ;; returns "foobarfooxyzfoobar". |
||
---|---|---|
.. | ||
test | ||
CMakeLists.txt | ||
price-quotes.scm | ||
utilities.scm |