VirtualBox

source: kBuild/trunk/src/grep/tests/context-0

Last change on this file was 3529, checked in by bird, 3 years ago

Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.

  • Property svn:executable set to *
File size: 446 bytes
Line 
1#!/bin/sh
2# 0 lines of context
3. "${srcdir=.}/init.sh"; path_prepend_ ../src
4
5cat <<EOF > in || framework_failure_
6needle
71st line of context
82nd line of context
93rd line of context
10another needle
115th line of context relative to first match
126th line...
13EOF
14
15cat <<EOF > exp || framework_failure_
16needle
17--
18another needle
19EOF
20
21fail=0
22grep -C 0 needle in > out 2>err || fail=1
23
24compare exp out || fail=1
25compare /dev/null err || fail=1
26
27Exit $fail
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette