"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
POSIX function syntax for regress/cmdline/*.sh
To:
gameoftrees@openbsd.org
Date:
Sat, 12 Sep 2020 23:18:28 +0200

Download raw body.

Thread
The shell scripts under regress/cmdline/ don't look very demanding,
but there is the teeny issue that

  function foo ...

is not sh syntax.  It's Korn shell.  The Bourne/POSIX shell way to
define a function is

  foo() ...

I would like to fix this.

-function test_add_basic {
+test_add_basic() {

I'm not including a diff; it's a mechanical change for about three
hundred function definitions.  I ran sed over *.sh and the tests
are still fine.

ok?

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de