shithub: scc

Download patch

ref: f3b095597e0bed7fa54e92d8d37dc9f98c0e652d
parent: 5fffd4ac0ac75d6ba1d8e978a9c618ede9e5f2e5
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Feb 19 16:54:05 EST 2018

[ar] Add basic skeleton for -m tests

--- /dev/null
+++ b/tests/ar/execute/50-test-m.sh
@@ -1,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