##// END OF EJS Templates
tests: use `f --hexdump` to print file content...
Gregory Szorc -
r45132:da9b7f96 default
parent child Browse files
Show More
@@ -7,10 +7,6 b''
7 7 > data = data.replace(b'\n', b'\r')
8 8 > open(path, 'wb').write(data)
9 9 > EOF
10 $ cat > print.py <<EOF
11 > import sys
12 > print(sys.stdin.read().replace('\n', '<LF>').replace('\r', '<CR>').replace('\0', '<NUL>'))
13 > EOF
14 10 $ hg init
15 11 $ echo '[hooks]' >> .hg/hgrc
16 12 $ echo 'pretxncommit.cr = python:hgext.win32text.forbidcr' >> .hg/hgrc
@@ -32,7 +28,9 b''
32 28 rollback completed
33 29 abort: pretxncommit.cr hook failed
34 30 [255]
35 $ hg cat f | "$PYTHON" print.py
36 hello<LF>
37 $ cat f | "$PYTHON" print.py
38 hello<CR>
31 $ hg cat f | f --hexdump
32
33 0000: 68 65 6c 6c 6f 0a |hello.|
34 $ f --hexdump f
35 f:
36 0000: 68 65 6c 6c 6f 0d |hello.|
General Comments 0
You need to be logged in to leave comments. Login now