Skip to content

Commit eb3cb4d

Browse files
committed
Fix tests and clarify first character access
1 parent 33b5cff commit eb3cb4d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

py/repl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ size_t mp_repl_autocomplete(const char *str, size_t len, const mp_print_t *print
189189
if (dest[0] != MP_OBJ_NULL) {
190190
// special case; filter out words that begin with underscore
191191
// unless there's already a partial match
192-
if (s_len == 0 && *d_str == '_') {
192+
if (s_len == 0 && d_str[0] == '_') {
193193
continue;
194194
}
195195
if (match_str == NULL) {

tests/cmdline/repl_autocomplete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
i = str
88
i.lowe ('ABC')
99
x = 5
10-
x.
10+
x. 
1111
x._
1212
None. 

tests/cmdline/repl_autocomplete.py.exp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Use \.\+
1212
'abc'
1313
>>> x = 5
1414
>>> x.
15-
from_bytes to_bytes
15+
from_bytes to_bytes
16+
>>> x.
1617
>>> x.__class__
1718
<class 'int'>
1819
>>> None.

0 commit comments

Comments
 (0)