-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9617cb9
commit 165d87d
Showing
5 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "gen-compose" | ||
version = "1.0.1" | ||
version = "1.1.0" | ||
description = "Key generator for macos keybinding system" | ||
authors = ["Granitosaurus <[email protected]>"] | ||
license = "GPL-3.0-or-later" | ||
|
@@ -25,6 +25,7 @@ click = "^7.1.2" | |
pyyaml = "^5.3.1" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^6.1.0" | ||
|
||
[tool.poetry.scripts] | ||
gen-compose = "gencompose:main" | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# some leading comments | ||
# that should be ignored | ||
<Multi_key> <period> <period> : "…" U2026 # HORIZONTAL ELLIPSIS | ||
|
||
# spaces and line breaking comments should be ignored too |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from pathlib import Path | ||
|
||
from click.testing import CliRunner | ||
from convcompose import main | ||
|
||
|
||
def test_xcompose_convert(): | ||
runner = CliRunner() | ||
file = Path(__file__).parent / 'test.compose' | ||
result = runner.invoke(main, args=['xcompose', str(file)]) | ||
assert result.exit_code == 0 | ||
assert result.output == '"..": "…"\n' | ||
result = runner.invoke(main, args=['xcompose', str(file), '--keep-comments']) | ||
assert result.exit_code == 0 | ||
assert result.output == '"..": "…" # HORIZONTAL ELLIPSIS\n' |