blob: 48dbfd5c7c1563c30f70efeb3cdf058b4be7f4f4 [file] [log] [blame]
Damien Georged3b32ca2015-05-08 00:19:56 +01001#include <stdio.h>
2
3#include "py/obj.h"
4#include "py/runtime.h"
5#include "py/repl.h"
6
7#if defined(MICROPY_UNIX_COVERAGE)
8
9// function to run extra tests for things that can't be checked by scripts
10void run_extra_coverage_tests(void);
11
12void run_extra_coverage_tests(void) {
13 // repl autocomplete
14 {
15 const char *str;
16 mp_uint_t len = mp_repl_autocomplete("__", 2, &mp_plat_print, &str);
17 printf("%.*s\n", (int)len, str);
18
19 mp_store_global(MP_QSTR_sys, mp_import_name(MP_QSTR_sys, mp_const_none, MP_OBJ_NEW_SMALL_INT(0)));
20 mp_repl_autocomplete("sys.", 4, &mp_plat_print, &str);
21 len = mp_repl_autocomplete("sys.impl", 8, &mp_plat_print, &str);
22 printf("%.*s\n", (int)len, str);
23 }
24}
25
26#endif