| 
            Last change
 on this file was             3529, checked in by bird, 4 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:
            624 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | #!/bin/sh
 | 
|---|
| 2 | # exercise the -w option on multiple files
 | 
|---|
| 3 | # Derived from https://bugzilla.redhat.com/570500
 | 
|---|
| 4 | . "${srcdir=.}/init.sh"; path_prepend_ ../src
 | 
|---|
| 5 | 
 | 
|---|
| 6 | mkdir a || framework_failure_
 | 
|---|
| 7 | ( cd a \
 | 
|---|
| 8 |     && echo aa bb cc > 1 \
 | 
|---|
| 9 |     && echo bb dd ff > 2 \
 | 
|---|
| 10 |     && echo ff gg hh > 3 \
 | 
|---|
| 11 |     && echo bb xx zz > 4 \
 | 
|---|
| 12 | ) || framework_failure_
 | 
|---|
| 13 | 
 | 
|---|
| 14 | cat << \EOF > exp1 || framework_failure_
 | 
|---|
| 15 | a/1:aa bb cc
 | 
|---|
| 16 | a/2:bb dd ff
 | 
|---|
| 17 | a/4:bb xx zz
 | 
|---|
| 18 | EOF
 | 
|---|
| 19 | sed s/..// exp1 > exp2 || framework_failure_
 | 
|---|
| 20 | 
 | 
|---|
| 21 | fail=0
 | 
|---|
| 22 | grep -rw bb a > out || fail=1
 | 
|---|
| 23 | sort < out > k; mv k out
 | 
|---|
| 24 | compare exp1 out || fail=1
 | 
|---|
| 25 | 
 | 
|---|
| 26 | (cd a && grep -w bb [1-4]) > out || fail=1
 | 
|---|
| 27 | compare exp2 out || fail=1
 | 
|---|
| 28 | 
 | 
|---|
| 29 | Exit $fail
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.