Files
dc/sas/sasjs/macros
dc f1b9484463
Build / Build-and-ng-test (pull_request) Successful in 6m32s
Lighthouse Checks / lighthouse (pull_request) Successful in 18m54s
Build / Build-and-test-development (pull_request) Successful in 35m8s
test(macros): cover mpe_dirlist and mpe_writecheck directly
The service tests exercise the actions through a child session; these call the
macros in place, so the guard and the answers are covered without a request:

  mpe_dirlist      7 assertions - iftrue=0 does nothing, one level, files
                   excluded, three levels, the depth cap, the maxobs cap with
                   TRUNCATED=Y, and a blank parent returning a root path
  mpe_writecheck   5 assertions - iftrue=0 does nothing, a writable folder, a
                   file, a missing path with a reason, and the probe leaving an
                   existing file that already had its old name alone

They live in sasjs/macros beside the macros they test, which works: a test file
in a declared macro folder compiles to sasjsbuild/tests/macros/ and sasjs test
runs it from there.

Two traps, both hit before this passed:

- these macros write JSON to _webout, so the test has to point _webout at a
  temp file while they run and put it back before the term program writes the
  results - the first attempt redirected without restoring and the runner
  reported "No webout was returned by job";
- descriptions in mp_assert must not contain a comma: an unquoted comma splits
  the parameter list and the assertion fails to compile with "All positional
  parameters must precede keyword parameters", which names the call rather than
  the comma.
2026-11-03 09:21:43 +00:00
..
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00
2023-07-13 13:44:05 +02:00