scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 8bbde8d70865d86dfb70713f7c1304a6a2ef4de5
parent a1d384d7e6679855b3ac78b188928aaef1ddff03
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 17 Oct 2024 10:03:32 +0200

tests/cc: Update twice in update.sh

When running update.sh it can add/remove lines to the header
that makes invalid all the numbers in the first execution,
forcing to run it 2 times. As there were sereval commits updating
several tests with this problem then is better to run the update
twice in the onw script.

Diffstat:
Mtests/cc/error/update.sh | 22++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/tests/cc/error/update.sh b/tests/cc/error/update.sh @@ -1,10 +1,16 @@ #!/bin/sh -for i -do - (echo '/^PATTERN/+;/^\./-c' - scc $CFLAGS -W -c $i 2>&1 - printf ".\nw\n" - echo w) | - ed -s $i -done +update() +{ + for i + do + (echo '/^PATTERN/+;/^\./-c' + scc $CFLAGS -W -c $i 2>&1 + printf ".\nw\n" + echo w) | + ed -s $i + done +} + +update $@ +update $@