summaryrefslogtreecommitdiff
path: root/tests/frontend/overlaps.py
blob: cc7c08fa6957b3e7a58e17da5a7487e131958903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
import pytest
from tests.testutils.runcli import cli

# Project directory
DATA_DIR = os.path.join(
    os.path.dirname(os.path.realpath(__file__)),
    "overlaps"
)


@pytest.mark.datafiles(DATA_DIR)
def test_overlaps(cli, datafiles):
    project = os.path.join(datafiles.dirname, datafiles.basename)
    result = cli.run(project=project, silent=True, args=[
        'build', 'collect.bst'])

    assert result.exit_code == 0
    print(result.output)
    assert "/file1: three.bst above one.bst" in result.output
    assert "/file2: two.bst above three.bst above one.bst" in result.output
    assert "/file3: two.bst above three.bst" in result.output