summaryrefslogtreecommitdiffstats
path: root/tests/012/defset.tl
Commit message (Collapse)AuthorAgeFilesLines
* defset: bind new-val-sym to temporary variable.Kaz Kylheku2019-06-281-2/+12
| | | | | | | | | | | | | | | | | | | | | | Users of defset no longer have to ensure that in the store form, the symbol which gives the new value to be stored is inserted only once. * share/txr/stdlib/defset.tl (defset-expander): Transform the store form by inserting a temporary variable using alet. (sub-list, sub-vec, sub-str): These place forms no longer require a local gensym. * txr.1: Updated doc. * tests/012/defset.tl: The expected output for the inc case now incorporates a gensym that comes from the compiled defset macro. Since we can't control that by means of the gensym counter, we resort to extracting it from the expansion itself, then check the test case against a template which incorporates that gensym. We check that the extracted item really is a gensym: it's a symbol with no home package whose name starts with "g".
* defset: add tests.Kaz Kylheku2019-06-171-0/+11
* tests/012/defset.tl: New file. * tests/012/defset.expected: New file.