tests/readlink.py
author Yuya Nishihara <yuya@tcha.org>
Tue, 26 May 2015 23:14:50 +0900
changeset 25287 56eed3923dbc
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
test-revset: update test that isn't broken on default branch "X or wdir()" just works because the default branch includes 40a2cf1c765b.

#!/usr/bin/env python

import errno, os, sys

for f in sys.argv[1:]:
    try:
        print f, '->', os.readlink(f)
    except OSError, err:
        if err.errno != errno.EINVAL:
            raise
        print f, 'not a symlink'

sys.exit(0)