Files
langkit/testsuite/tests/python-api/unit_filename/main.py
Pierre-Marie de Rodat 6bea6442a6 Display only the unit base file name in various Image functions
This will make it possible to preserve a stable image after we enable
unit filename canonicalization (i.e. getting an absolute path).

TN: R206-016
2018-02-07 15:15:49 +01:00

15 lines
302 B
Python

from __future__ import absolute_import, division, print_function
print('main.py: Running...')
import os.path
import libfoolang
ctx = libfoolang.AnalysisContext()
u = ctx.get_from_buffer('foo.txt', 'example')
print('Unit filename: {}'.format(os.path.basename(u.filename)))
print('main.py: Done.')