scc

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

commit f407a239bb2ca46375496a2929abcf1325937483
parent c9c89094152c39d43ab8a64324a2b6934dbd1546
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 19 Feb 2018 21:54:05 +0000

[ar] Add basic skeleton for -m tests

Diffstat:
Atests/ar/execute/50-test-m.sh | 38++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+), 0 deletions(-)

diff --git a/tests/ar/execute/50-test-m.sh b/tests/ar/execute/50-test-m.sh @@ -0,0 +1,38 @@ +#!/bin/sh + + +exec >> test.log 2>&1 +set -e + +tmp1=`mktemp` +tmp2=`mktemp` +trap "rm -f file* $tmp1 $tmp2" 0 2 3 + +cp master.a file.a +############################################################################ +#move 1st without specifier + +ar -mv file.a file1 +ar -t file.a > $tmp1 + +cat <<EOF > $tmp2 +file2 +file3 +file1 +EOF + +cmp $tmp1 $tmp2 +############################################################################ +#move 1st at the end + +cp master.a file.a +ar -mv -a file3 file.a file1 +at -t file.a > $tmp1 + +cat <<EOF > $tmp2 +file2 +file3 +file1 +EOF + +cmp $tmp1 $tmp2