diff options
author | Georg Brandl <georg@python.org> | 2021-01-17 11:18:17 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2021-01-17 11:18:17 +0100 |
commit | b4594169025485f7d64d5ffd71f42673e7a5972d (patch) | |
tree | e5307a559bfde2a5f317d416180193acf86980f4 /tests/test_cmdline.py | |
parent | 7e6dbb20ce189022f1b0a058f44bd1c0b9d529a5 (diff) | |
download | pygments-git-b4594169025485f7d64d5ffd71f42673e7a5972d.tar.gz |
Added `pygmentize -C` option to guess a lexer from content
Diffstat (limited to 'tests/test_cmdline.py')
-rw-r--r-- | tests/test_cmdline.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index d740fccb..731729d9 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -220,6 +220,13 @@ def test_N_opt(): assert 'text' == o.strip() +def test_C_opt(): + o = check_success('-C', stdin='#!python3\n') + assert 'python' == o.strip() + o = check_success('-C', stdin='x') + assert 'text' == o.strip() + + def test_invalid_opts(): for opts in [ ('-X',), |