VirtualBox

source: kBuild/trunk/src/grep/tests/max-count-overread

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: 306 bytes
Line 
1#!/bin/sh
2# Ensure that -m1 stops reading after the first match.
3# In grep-2.19, yes x|grep -m1 x would infloop.
4
5. "${srcdir=.}/init.sh"; path_prepend_ ../src
6require_timeout_
7
8fail=0
9
10echo x > exp || framework_failure_
11
12yes x | timeout 10 grep -m1 x > out || fail=1
13compare exp out || fail=1
14
15Exit $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