This file is indexed.

/usr/lib/x86_64-linux-gnu/pyotherside/tests/test_callback_errors/test_callback_errors.qml is in pyotherside-tests 1.4.0-2build1.

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
30
31
32
33
34
35
36
37
38
39
40
41
import QtQuick 2.0
import io.thp.pyotherside 1.2

// Test if PyOtherSide correctly reports JS errors happening in callbacks
// in signal error(string traceback) for both imports and function calls.

Python {
    property var tests: ([])

    function test_next() {
        if (tests.length) {
            tests.pop()();
        } else {
            console.log('Tests done');
            Qt.quit();
        }
    }

    Component.onCompleted: {
        tests.unshift(function () {
            console.log('Expecting ReferenceError for "invalid" on import');
            importModule('os', function (success) {
                invalid;
            });
        });
        tests.unshift(function() {
            console.log('Expecting TypeError for "lock" property');
            call('os.getcwd', [], function (result) {
                console.lock(result);
            });
        });
        test_next();
    }

    onError: {
        // Remove full path to .qml file
        var msg = traceback.replace(Qt.resolvedUrl('.'), '');
        console.log('Got error: ' + msg);
        test_next();
    }
}