From d69b71231167fcf43e1bcb3abf74d9f01ededcd8 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 19 Aug 2023 07:55:25 +1000 Subject: [PATCH] tests: fix up "extend" and extend 00-basic We now have a test in 00-basic which moves the cursor in and out of a wrap field so that it appears and disappears. When it appears it changes the number of displayed lines. This doesn't work properly. Signed-off-by: NeilBrown --- tests | 14 ++++-- tests.d/00-basic | 119 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 127 insertions(+), 6 deletions(-) diff --git a/tests b/tests index 023d839a..1d326b9c 100755 --- a/tests +++ b/tests @@ -109,19 +109,25 @@ extend_test() { exit 1 fi rm -f tests.d/.tmp tests.d/.tmp2 - sed -e '/^Close/d' $tt > tests.d/.tmp2 + # find :C-X :C-C that closes the editor. + n=$(grep -n 'Key ":C-X"' $tt | tail -n 1| sed 's/:.*//') + if [ -z "$n" ]; then + echo >&2 "$0: cannot find tailing :C-X" + exit 1; + fi + head -n $[n-1] $tt > tests.d/.tmp2 runtest extend tests.d/.tmp tests.d/.tmp2 if ! grep -s '^Close' tests.d/.tmp > /dev/null ; then echo >&2 "$0: test file not Closed - probably crash" exit 1 fi - mv tests.d/.tmp2 $tt setup_test_dir runtest run $tt tests.d/.tmp - diff -u tests.d/.tmp $tt - #rm tests.d/.tmp + #diff -u tests.d/.tmp $tt + rm -f tests.d/.tmp tests.d/.tmp2 exit 0 } + run_one_test() { if [ ! -f "tests.d/$1" ]; then echo "$cmd: test $1 doesn't exist" diff --git a/tests.d/00-basic b/tests.d/00-basic index 5633aa19..35ad0e3d 100644 --- a/tests.d/00-basic +++ b/tests.d/00-basic @@ -600,6 +600,121 @@ Key ":Enter" Display 80,30 25679283B88265B98ADEB89F60C76D93 1,0 Key ":C-X" Display 80,30 84F4B35BF26F9D5EEBB67D572ADD0BBF 1,0 +Key ":C-F" +Display 80,30 7C0F0C177E21F3D7A13F7EF584009F9F 49,13 +Key "-R" +Display 80,30 FDA5EA9A53329FB91BC5D4C3D1FD83F3 50,13 +Key "-E" +Display 80,30 9B750D9D668BB50CE7739F48F04F2910 51,13 +Key ":Tab" +Display 80,30 921BB37575FB218DE71F646EE21973BB 50,13 +Key ":Enter" +Display 80,30 B116277653C29D730B60D8C76FE09D5A 1,0 +Key ":C-X" +Display 80,30 F5F7732466ABB05F68FF587335F16BA2 1,0 +Key "-3" +Display 80,30 85144CF697C47A180E9E3E765E492FD8 1,0 +Key ":C-N" +Display 80,30 B6B76960382B1C5A669223D248BE2486 1,2 +Key ":C-N" +Display 80,30 CF02DF48B4B26DB9BD6A98F24F196DDD 1,3 +Key ":C-N" +Display 80,30 929C96069A2610CF03863878E5FF187B 1,4 +Key ":C-N" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 1,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 2,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 3,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 4,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 5,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 6,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 7,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 8,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 9,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 10,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 11,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 12,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 13,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 14,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 15,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 16,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 17,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 18,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 19,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 20,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 21,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 22,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 23,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 24,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 25,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 26,6 +Key ":C-F" +Display 80,30 5C995EFFCB1F7836C873667D308F5302 27,6 +Key "- " +Display 80,30 605E255F69526EA188539A4ED905FB63 28,6 +Key "- " +Display 80,30 B28220C710521C658FF005FC88C7E32B 29,6 +Key "- " +Display 80,30 80C2F3A7AA5C84D00388D11AC44FDAA0 30,6 +Key "- " +Display 80,30 133EECD6E87A822D1C3D514706965594 31,6 +Key "- " +Display 80,30 E30808BA6112A7DE56772F476D142C37 32,6 +Key "- " +Display 80,30 64D3C49EEC1A1981A1480DFFAE405035 33,6 +Key "- " +Display 80,30 7FD72C05CA2F4A956DAD11E5DD5A966E 34,6 +Key "- " +Display 80,30 7FD72C05CA2F4A956DAD11E5DD5A966E 35,6 +Key "- " +Display 80,30 7FD72C05CA2F4A956DAD11E5DD5A966E 36,6 +Key "- " +Display 80,30 7FD72C05CA2F4A956DAD11E5DD5A966E 37,6 +Key "- " +Display 80,30 7FD72C05CA2F4A956DAD11E5DD5A966E 38,6 +Key "- " +Display 80,30 F43A1C09CED040DA0FE18A4DC1C18CA7 1,7 +Key "- " +Display 80,30 8D6C80DEB3D6B4ACFFFAD384B9460A82 2,7 +Key "- " +Display 80,30 32C267E68B9EFE6C5CBD9B7C7ECDC0A2 3,7 +Key "- " +Display 80,30 EC2C0C5779D217786DBF72009BC289A2 4,7 +Key "- " +Display 80,30 A84DE4E3F90DB9F454DC6BDD158DAEC4 5,7 +Key "- " +Display 80,30 21D172645F11E5F6F6A2B853FB151B23 6,7 +Key ":C-F" +Display 80,30 21D172645F11E5F6F6A2B853FB151B23 7,7 +Key ":C-F" +Display 80,30 68CC3869602D7CE09C8CB343CB22E8D9 2,7 +Key ":C-X" +Display 80,30 CF77174CFC77ECAC2102213E88F4BF50 2,7 Key ":C-C" -Display 80,30 25679283B88265B98ADEB89F60C76D93 1,0 -Close 1577 +Display 80,30 7EB025B1893D47CC56F241B3FAB0090A 21,8 +Key "-q" +Close 1819 -- 2.39.5