[Toybox] [PATCH] tar.test: workaround for mksh.

enh enh at google.com
Mon Apr 29 13:40:34 PDT 2019


mksh behaves differently for `VAR=val x` depending on whether x is a
command/builtin or a function.

Commands:

  crosshatch:/ # POOP=1 date
  Mon Apr 29 20:33:19 GMT 2019
  crosshatch:/ # echo $POOP

Builtins:

  crosshatch:/ # POOP=1 echo $POOP

  crosshatch:/ # echo $POOP

Functions:

  crosshatch:/ # function poop()
  > {
  > echo $POOP
  > }
  crosshatch:/ # poop

  crosshatch:/ # POOP=1 poop
  1
  crosshatch:/ # echo $POOP
  1
  crosshatch:/ #

This causes all tar tests following the one that uses LSTARG to fail.
Switch to making LST take an argument instead, since there's only one
special caller.
---
 tests/tar.test | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tar.test-workaround-for-mksh.patch
Type: text/x-patch
Size: 1643 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190429/a297955c/attachment.bin>


More information about the Toybox mailing list