mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 17:30:59 +01:00
13 lines
365 B
Python
13 lines
365 B
Python
![]() |
"""Tests bashisms xontrib."""
|
||
|
import pytest
|
||
|
|
||
|
@pytest.mark.parametrize('inp, exp', [
|
||
|
('x = 42', 'x = 42'),
|
||
|
('!!', 'ls'),
|
||
|
])
|
||
|
def test_preproc(inp, exp, xonsh_builtins):
|
||
|
"""Test the bash preprocessor."""
|
||
|
from xontrib.bashisms import bash_preproc
|
||
|
xonsh_builtins.__xonsh_history__.inps = ['ls\n']
|
||
|
obs = bash_preproc(inp)
|
||
|
assert exp == obs
|