##// 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 > data = data.replace(b'\n', b'\r')
7 > data = data.replace(b'\n', b'\r')
8 > open(path, 'wb').write(data)
8 > open(path, 'wb').write(data)
9 > EOF
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 $ hg init
10 $ hg init
15 $ echo '[hooks]' >> .hg/hgrc
11 $ echo '[hooks]' >> .hg/hgrc
16 $ echo 'pretxncommit.cr = python:hgext.win32text.forbidcr' >> .hg/hgrc
12 $ echo 'pretxncommit.cr = python:hgext.win32text.forbidcr' >> .hg/hgrc
@@ -32,7 +28,9 b''
32 rollback completed
28 rollback completed
33 abort: pretxncommit.cr hook failed
29 abort: pretxncommit.cr hook failed
34 [255]
30 [255]
35 $ hg cat f | "$PYTHON" print.py
31 $ hg cat f | f --hexdump
36 hello<LF>
32
37 $ cat f | "$PYTHON" print.py
33 0000: 68 65 6c 6c 6f 0a |hello.|
38 hello<CR>
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