tests/test-diff-ignore-whitespace
changeset 2610 7a87aebd848e
parent 2594 bdf9d809467c
child 3192 096f1c73cdc3
equal deleted inserted replaced
2609:6c5b1b5cc160 2610:7a87aebd848e
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 # GNU diff is the reference for all of these results.
     3 # GNU diff is the reference for all of these results.
     4 
     4 
     5 hgdiff() {
     5 hgdiff() {
     6     hg diff "$@" | sed "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/"
     6     hg diff "$@" | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
       
     7                   -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
     7 }
     8 }
     8 
     9 
     9 test_added_blank_lines() {
    10 test_added_blank_lines() {
    10     printf '\nhello world\n\ngoodbye world\n\n' >foo
    11     printf '\nhello world\n\ngoodbye world\n\n' >foo
    11 
    12