]> git.draconx.ca Git - dxcommon.git/commit
tests: Improve portability for perl script tests.
authorNick Bowler <nbowler@draconx.ca>
Sat, 18 Nov 2023 07:40:51 +0000 (02:40 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sat, 18 Nov 2023 21:39:56 +0000 (16:39 -0500)
commit25e5a26bf46adbe4c7cf44ff58aec071c4241e4c
treec64daa2ff311c0ad8536dfb81603d9c3bd3b64c9
parent846482f49d7cf15b749c5b67ab8268f4d82297a4
tests: Improve portability for perl script tests.

Older versions of perl do not recognize the "-f" option, which I think
was just used by mistake anyway, so we can just remove it.

Sed commands like /foo/{g;p} are not portable; POSIX requires it to be
written like:

  /foo/{
  g
  p
  }

HP-UX 11 sed does not interpret "-f -" to mean "read the script from
standard input", as intended; it looks for a file called - instead.
There is little reason to do this, we can just quote the script
normally.

Fixing all this allows the tests to run on HP-UX 11.
tests/scripts.at