scc

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

commit a46afb38ad256f2a2a202f9e92e4c0ee663814df
parent 4855256c0db424bb49a6ac32d0ec6e4d0577a07b
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 22 Feb 2018 15:17:02 +0000

[tests/ar] Add master.a target

It helps to debug if you have this file.

Diffstat:
Mtests/ar/execute/Makefile | 5++++-
Mtests/ar/execute/chktest.sh | 2+-
Atests/ar/execute/mkmaster.sh | 22++++++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/tests/ar/execute/Makefile b/tests/ar/execute/Makefile @@ -5,9 +5,12 @@ ROOTDIR=$(PROJECTDIR)/rootdir all: tests -tests: +tests: master.a PATH=$(ROOTDIR)/bin:$$PATH ./chktest.sh +master.a: + ./mkmaster.sh + clean: rm -f *.a test.log rm -f file* diff --git a/tests/ar/execute/chktest.sh b/tests/ar/execute/chktest.sh @@ -1,7 +1,7 @@ #!/bin/sh ttyflags=`stty -g` -trap "stty $ttyflags;tabs -8;rm -rf master.a file*" 0 2 3 15 +trap "stty $ttyflags;tabs -8;rm -rf file*" 0 2 3 15 stty tabs tabs 40 ulimit -c 40 diff --git a/tests/ar/execute/mkmaster.sh b/tests/ar/execute/mkmaster.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +uid=`id -u` +gid=`id -g` + +cat <<EOF >master.a +!<arch> +file1 315532800 `printf "%-6d" $uid``printf "%-6d" $gid`100644 79 \` +This is the first file, +and it should go in the +first position in the archive. + +file2 315532800 `printf "%-6d" $uid``printf "%-6d" $gid`100644 125 \` +But this other one is the second one, +and it shouldn't go in the first position +because it should go in the second position. + +file3 315532800 `printf "%-6d" $uid``printf "%-6d" $gid`100644 118 \` +and at the end, this is the last file +that should go at the end of the file, +thus it should go in the third position. +EOF