re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / numeric.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2015-2016 Free Software Foundation, Inc.
4 #
5 # GNU tar is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # GNU tar is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 AT_SETUP([--numeric-owner basic tests])
19 AT_KEYWORDS([options numeric numeric-owner])
20
21 m4_pushdef([TESTOP],[
22 decho $1
23 tar $1 -vvf a dir --numeric-owner |dnl
24  awk '@S|@2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
25 tar $1 -vvf a dir |dnl
26  awk '@S|@2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
27 ])
28
29 AT_TAR_CHECK([
30 mkdir dir
31 genfile --file dir/file
32
33 MYUID=$(id -u) || AT_SKIP_TEST
34 MYGID=$(id -g) || AT_SKIP_TEST
35 MYUSR=$(id -un) || AT_SKIP_TEST
36 MYGRP=$(id -gn) || AT_SKIP_TEST
37
38 TESTOP([--create])
39 TESTOP([--list])
40 TESTOP([--diff])
41 TESTOP([--extract])
42 ],
43 [0],
44 [--create
45 OK
46 OK
47 OK
48 OK
49 --list
50 OK
51 OK
52 OK
53 OK
54 --diff
55 OK
56 OK
57 OK
58 OK
59 --extract
60 OK
61 OK
62 OK
63 OK
64 ],
65 [--create
66 --list
67 --diff
68 --extract
69 ],[],[],[posix,gnu,ustar,oldgnu])
70
71 AT_CLEANUP
72
73 m4_popdef([TESTOP])
74