This file is indexed.

/usr/share/thefuck/tests/rules/test_sudo.py is in thefuck 3.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pytest
from thefuck.rules.sudo import match, get_new_command
from tests.utils import Command


@pytest.mark.parametrize('stderr, stdout', [
    ('Permission denied', ''),
    ('permission denied', ''),
    ("npm ERR! Error: EACCES, unlink", ''),
    ('requested operation requires superuser privilege', ''),
    ('need to be root', ''),
    ('need root', ''),
    ('must be root', ''),
    ('You don\'t have access to the history DB.', ''),
    ('', "error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/ipaddr.py'")])
def test_match(stderr, stdout):
    assert match(Command(stderr=stderr, stdout=stdout))


def test_not_match():
    assert not match(Command())


@pytest.mark.parametrize('before, after', [
    ('ls', 'sudo ls'),
    ('echo a > b', 'sudo sh -c "echo a > b"'),
    ('echo "a" >> b', 'sudo sh -c "echo \\"a\\" >> b"')])
def test_get_new_command(before, after):
    assert get_new_command(Command(before)) == after