test_12_core (test_margin.Core.test_12_core) 12: the pure editor, the chunk split and the row walk ... ok test_10_house_rules (test_margin.HouseRules.test_10_house_rules) 10: no long dash, no spaced double hyphen, stdlib only, a narrow plain --help ... ok test_11_the_card (test_margin.HouseRules.test_11_the_card) 11: install line, alias line, parts 1 to 4 in order, narrow, no n/m readout ... ok test_01_02_bell_positions_and_no_readout (test_margin.Terminal.test_01_02_bell_positions_and_no_readout) 1, 2: bells at 15, 20, 21, 22, 23; nothing else on the pty ... observed: run 1 rang at [15, 20, 21, 22, 23] out.txt b'abcdefghijklmnopqrstuvw\n' pty b'abcdefghijklmno\x07pqrst\x07u\x07v\x07w\x07\r\n' observed: run 2 out.txt b'abcdefghijklmnopqrst\n' observed: run 3 (0 by 0) Backspace on empty line gave b'' out.txt b'ab\n' exit 0 ok test_03_git_and_the_copies (test_margin.Terminal.test_03_git_and_the_copies) 3: $(margin) in a real git commit, read back from log, format-patch, shortlog, alias ... observed: git commit --allow-empty -m "$(margin 30)" -> 'Fix the thing that was broken\n' observed: oneline 'f83dd31 Fix the thing that was broken\n' patch ['Subject: [PATCH] Fix the thing that was broken'] shortlog 'margin check (1):\n Fix the thing that was broken\n\n' observed: git cm --allow-empty -> 'Second line, by alias\n' ok test_04_characters_not_bytes (test_margin.Terminal.test_04_characters_not_bytes) 4: precomposed, decomposed and wide characters each count one ... observed: '\xe9' rang at [15] out.txt b'\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\xc3\xa9\n' observed: 'e\u0301' rang at [15] out.txt b'e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81e\xcc\x81\n' observed: '\u5b57' rang at [15] out.txt b'\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\xe5\xad\x97\n' ok test_05_editing_and_wrap (test_margin.Terminal.test_05_editing_and_wrap) 5: a 20 column tmux pane, a 40 wide margin, repaint across wrapped rows ... observed: 45 letters ['margin 40', 'abcdefghijklmnopqrst', 'uvwxyzabcdefghijklmn', 'opqrs'] bells 7 observed: after Backspace to 40 ['margin 40', 'abcdefghijklmnopqrst', 'uvwxyzabcdefghijklmn'] observed: after Backspace to 34 ['margin 40', 'abcdefghijklmnopqrst', 'uvwxyzabcdefgh'] observed: Ctrl-W ['margin 40', 'abcdefghijklmnopqrst', 'uvwxyzabcdefghi'] cursor_x 16 observed: 20 then Backspace ['margin 40', 'abcdefghijklmnopqrs'] bells 8 ok test_06_withdraw_and_restore (test_margin.Terminal.test_06_withdraw_and_restore) 6: Ctrl-C, Ctrl-D empty, Ctrl-D with text; the terminal is cooked afterwards ... observed: 'abc\x03' rc=130 out.txt b'' ['icanon', 'echo'] observed: '\x04' rc=1 out.txt b'' ['icanon', 'echo'] observed: 'abc\x04' rc=0 out.txt b'abc\n' ['icanon', 'echo'] ok test_07_paste (test_margin.Terminal.test_07_paste) 7: one chunk is one bell; escapes inside a chunk are dropped; Return ends it ... observed: 200 character chunk: BEL bytes 1 observed: arrow, Return mid chunk and bare Esc all held ok test_08_no_terminal (test_margin.Terminal.test_08_no_terminal) 8: a pipe, /dev/null and usage errors; no bell without a terminal ... observed: pipe -> hello, /dev/null -> 1, abc -> b"margin: 'abc' is not a width.\n" 0 -> 2 ok test_09_flash (test_margin.Terminal.test_09_flash) 9: --flash at the same moments, never delaying a key, never left on; --ring ... observed: flash on/off pairs 5 BEL 0 observed: 16th key echoed 11 ms into the flash, flash off after it observed: --ring --flash b'\x1b[?5h\x1b[?5lFlashed once. If you saw nothing, this terminal does not flash, and the margin will go unmarked.\r\n' ok test_13_start_margin (test_margin.Terminal.test_13_start_margin) 13: keys typed while the tool starts are kept, and shown once ... observed: screen ['Early bird'] out.txt b'Early bird\n' ok test_14_sigterm (test_margin.Terminal.test_14_sigterm) SIGTERM during a flash: the flash comes off and the terminal is restored ... observed: rc=143, flash off after on, echo and icanon restored ok ---------------------------------------------------------------------- Ran 13 tests in 46.748s OK