| 
            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:
            468 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | #!/bin/sh
 | 
|---|
| 2 | # Ensure that an invalid range like [b-a] evokes exit status of 2.
 | 
|---|
| 3 | . "${srcdir=.}/init.sh"; path_prepend_ ../src
 | 
|---|
| 4 | 
 | 
|---|
| 5 | fail=0
 | 
|---|
| 6 | 
 | 
|---|
| 7 | printf 'grep: Invalid range end\n' > exp
 | 
|---|
| 8 | for prog in grep 'grep -E'; do
 | 
|---|
| 9 |   # exit status must be 2, not 1
 | 
|---|
| 10 |   returns_ 2 $prog '[b-a]' < /dev/null > out 2>&1 || fail=1
 | 
|---|
| 11 | 
 | 
|---|
| 12 |   # Normalize the diagnostic prefix from e.g., "/mnt/dir/grep: " to "grep: "
 | 
|---|
| 13 |   sed 's/^[^:]*: /grep: /' out > k && mv k out
 | 
|---|
| 14 | 
 | 
|---|
| 15 |   compare exp out || fail=1
 | 
|---|
| 16 | done
 | 
|---|
| 17 | 
 | 
|---|
| 18 | Exit $fail
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.