comparison src/testdir/test_netbeans.py @ 20625:116c7bd5e980 v8.2.0866

patch 8.2.0866: not enough tests for buffer writing Commit: https://github.com/vim/vim/commit/494e9069cb32620f7688a7cb128a3feff827639e Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 31 21:28:02 2020 +0200 patch 8.2.0866: not enough tests for buffer writing Problem: Not enough tests for buffer writing. Solution: Add more tests. Use CheckRunVimInTerminal in more places. (Yegappan Lakshmanan, closes #6167)
author Bram Moolenaar <Bram@vim.org>
date Sun, 31 May 2020 21:30:03 +0200
parents b378f860d4ab
children c8a4ad051d23
comparison
equal deleted inserted replaced
20624:f782c48d548a 20625:116c7bd5e980
100 'netbeansBuffer_fail_Test' : '0:netbeansBuffer/85 T\n', 100 'netbeansBuffer_fail_Test' : '0:netbeansBuffer/85 T\n',
101 'setExitDelay_Test' : '0:setExitDelay!86 2\n', 101 'setExitDelay_Test' : '0:setExitDelay!86 2\n',
102 'setReadOnly_Test' : '3:setReadOnly!87\n', 102 'setReadOnly_Test' : '3:setReadOnly!87\n',
103 'close_Test' : '3:close!88\n', 103 'close_Test' : '3:close!88\n',
104 'specialKeys_Test' : '0:specialKeys!89 "F12 F13"\n', 104 'specialKeys_Test' : '0:specialKeys!89 "F12 F13"\n',
105 'detach_Test' : '2:close!90\n1:close!91\nDETACH\n' 105 'nbbufwrite_Test' : '4:editFile!90 "XnbBuffer"\n4:netbeansBuffer!91 T\n',
106 'detach_Test' : '2:close!92\n1:close!93\nDETACH\n'
106 } 107 }
107 # execute the specified test 108 # execute the specified test
108 if cmd not in testmap: 109 if cmd not in testmap:
109 print("=== invalid command %s ===" % (cmd)) 110 print("=== invalid command %s ===" % (cmd))
110 else: 111 else:
118 # receiving a newline only line. 119 # receiving a newline only line.
119 self.prev_line = line 120 self.prev_line = line
120 121
121 if len(response) > 0: 122 if len(response) > 0:
122 self.request.sendall(response.encode('utf-8')) 123 self.request.sendall(response.encode('utf-8'))
123 # Write the respoinse into the file, so that the test can knows 124 # Write the response into the file, so that the test can knows
124 # the command was sent. 125 # the command was sent.
125 with open("Xnetbeans", "a") as myfile: 126 with open("Xnetbeans", "a") as myfile:
126 myfile.write('send: ' + response) 127 myfile.write('send: ' + response)
127 if self.debug: 128 if self.debug:
128 with open("save_Xnetbeans", "a") as myfile: 129 with open("save_Xnetbeans", "a") as myfile: