~jamesodhunt/ubuntu/trusty/patch/bug-1306412

« back to all changes in this revision

Viewing changes to tests/fifo

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2013-06-30 16:14:19 UTC
  • mfrom: (6.1.6 experimental)
  • Revision ID: package-import@ubuntu.com-20130630161419-xg7lwk3vpejzedyc
Tags: 2.7.1-3
* Call 'ed' without a path. Closes: #714423.
* Update copyright for GPL v3. Closes: #664640.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2009, 2011-2012 Free Software Foundation, Inc.
 
2
#
 
3
# Copying and distribution of this file, with or without modification,
 
4
# in any medium, are permitted without royalty provided the copyright
 
5
# notice and this notice are preserved.
 
6
 
 
7
# Don't recognize hunks before a filename has been specified/seen
 
8
 
 
9
. $srcdir/test-lib.sh
 
10
 
 
11
require_cat
 
12
use_local_patch
 
13
use_tmpdir
 
14
 
 
15
# ==============================================================
 
16
 
 
17
cat > f.diff <<EOF
 
18
--- /dev/null
 
19
+++ f
 
20
@@ -0,0 +1 @@
 
21
+f
 
22
EOF
 
23
 
 
24
check 'patch --dry-run < f.diff' <<EOF
 
25
checking file f
 
26
EOF
 
27
 
 
28
check 'patch --dry-run -i f.diff' <<EOF
 
29
checking file f
 
30
EOF
 
31
 
 
32
mkfifo fifo
 
33
 
 
34
cat f.diff > fifo &
 
35
check 'patch --dry-run < fifo' <<EOF
 
36
checking file f
 
37
EOF
 
38
 
 
39
cat f.diff > fifo &
 
40
check 'patch --dry-run -i fifo' <<EOF
 
41
checking file f
 
42
EOF