Commit Graph

7 Commits (e07887f8b5e3bd52ad28207151b028d65eba75c3)

Author SHA1 Message Date
Mike Gerwitz bfea768f89 Copyright year 2020 update 2020-03-06 11:05:18 -05:00
Mike Gerwitz f270220b11 build-aux/csvm2csv: Propagate csvm-expand exit status
csvm2csv was not failing when csvm-expand exited with a non-zero
status.  Further, the tests were written incorrectly to account for this.

* build-aux/csvm2csv: Set `pipefail' option.
* build-aux/test/test-csvm2csv: Fix tests.
2019-04-09 10:57:59 -04:00
Mike Gerwitz 4c61dfb1cc csvm: Permit all whitespace (including tabs)
While tabs aren't desirable, users that are not developers will be modifying
these files, and so we need to be permissive in what we want to
accept.  That doesn't mean that we need to forego occasional formatting, though.
2019-04-08 15:17:00 -04:00
Mike Gerwitz e022a3133d Copyright year simplification and update to Ryan Specialty Group
This now uses year ranges, which I'll update annually.

This also renames "R-T Specialty" to "Ryan Specialty Group".  The latter is
the parent company of the former.  I was originally employed under the
former when LoVullo Associates was purchased, by I now work for the parent
company.
2019-02-07 13:23:09 -05:00
Mike Gerwitz 397710c055 csvm: Auto-sort expanded output
This will allow the variable abstractions to fully encapsulate values while
still permitting binary searches on sorted rows.

* csvm-expand: Renamed from `csvm2csv'.  Add directive support.
* csvm2csv: New script to perform sorting.  Invokes aforementioned.
* test/test-csvm2csv: Update for sorting.
2018-10-03 14:21:35 -04:00
Mike Gerwitz c675207696 csvm2csv: Add some error checks
* build-aux/csvm2csv: Fail on invalid var definition.
  (expand_vars): Fail in invalid reference.
  (parseline): Fail on non-numeric range.
* build-aux/test/test-csvm2csv
  (test-fail-unknown-var-ref, test-fail-non-numeric-range)
  (test-fail-invalid-var-dfn): New tests.
2018-10-02 13:35:06 -04:00
Mike Gerwitz c741b4a84e csvm: Add test cases and support for all variable expressions
This allows variables to contain any type of expansion, treating them
as (recursively) string replacements.

* csvm2csv: Add Copyright year.
  (expand_vars): New function.
  (parseline): Use it.  Expand before all other replacements so that
    variable expansions may support all types of expressions.  Expand
    variables in range expressions.
* test/test-csvm2csv: New file.
2018-10-01 16:14:05 -04:00