Add/fix copyright notices and adjust to latest GNU FDL.
[platform/upstream/coreutils.git] / tests / general / dd.at
1 #                                                       -*- autoconf -*-
2
3 # Copyright (C) 2000 Free Software Foundation, Inc.
4
5 # This program 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 2 of the License, or
8 # (at your option) any later version.
9
10 # This program 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, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 # 02110-1301, USA.
19
20 cat <<EOF
21
22 Executables (autoheader, autoupdate...)
23
24 EOF
25
26 AT_SETUP([dd's skip, seek, and conv=notrunc options])
27
28 AT_DATA(in, [[12345*7
29 ]])
30 AT_DATA(out, [[abcdefghijklmnop
31 ]])
32
33 AT_CHECK([dd bs=1 skip=1 seek=2 conv=notrunc count=3 if=in of=out], 0, [],
34 [3+0 records in
35 3+0 records out
36 ])
37 AT_CHECK([cat out], 0, [ab234fghijklmnop
38 ])
39
40 AT_CHECK([dd bskip=5 bseek=9 conv=notrunc count=1 if=in of=out], 0, [],
41 [0+1 records in
42 0+1 records out
43 ])
44 AT_CHECK([cat out], 0, [ab234fghi*7
45 mnop
46 ])
47
48 AT_CLEANUP
49
50
51 # ======================================================
52 AT_SETUP([dd])
53 AT_SETUP([dd's new bskip and bseek options])
54
55 AT_DATA(in, [[1*3
56 ]])
57 AT_DATA(out, [[abcde
58 ]])
59
60 AT_CHECK([dd bskip=1 bseek=2 count=1 if=in of=out], 0, [],
61 [0+1 records in
62 0+1 records out
63 ])
64 AT_CHECK([cat out], 0, [ab*3
65 ])
66
67 AT_CLEANUP