auto-sync
This commit is contained in:
parent
2b3ceb7082
commit
3e80f6a78a
|
@ -241,5 +241,5 @@ void firmwareError(const char *fmt, ...) {
|
|||
}
|
||||
|
||||
int getRusEfiVersion(void) {
|
||||
return 20141011;
|
||||
return 20141012;
|
||||
}
|
||||
|
|
|
@ -154,6 +154,22 @@ static void echo(int value) {
|
|||
}
|
||||
|
||||
int findEndOfToken(const char *line) {
|
||||
if (line[0] == '"') {
|
||||
/**
|
||||
* Looks like this is a quoted token
|
||||
*/
|
||||
int v = indexOf(line + 1, '"');
|
||||
if (v == -1) {
|
||||
/**
|
||||
* Matching closing quote not found
|
||||
*/
|
||||
return -1;
|
||||
}
|
||||
/**
|
||||
* Skipping first quote and the symbol after closing quote
|
||||
*/
|
||||
return v + 2;
|
||||
}
|
||||
return indexOf(line, ' ');
|
||||
}
|
||||
|
||||
|
|
|
@ -278,6 +278,12 @@ void testConsoleLogic(void) {
|
|||
char * cmd = "he ha";
|
||||
assertEquals(2, findEndOfToken(cmd));
|
||||
|
||||
cmd = "\"hee\" ha";
|
||||
assertEquals(5, findEndOfToken(cmd));
|
||||
|
||||
cmd = "\"h e\" ha";
|
||||
assertEquals(5, findEndOfToken(cmd));
|
||||
|
||||
|
||||
char *ptr = validateSecureLine(UNKNOWN_COMMAND);
|
||||
assertEquals(0, strcmp(UNKNOWN_COMMAND, ptr));
|
||||
|
@ -307,6 +313,12 @@ void testConsoleLogic(void) {
|
|||
assertEquals(111, atoi(lastFirst));
|
||||
assertEquals(333, atoi(lastThird));
|
||||
|
||||
|
||||
strcpy(buffer, "echosss \" 1\" 222 333");
|
||||
handleConsoleLine(buffer);
|
||||
assertTrue(strEqual("\" 1\"", lastFirst));
|
||||
|
||||
|
||||
//addConsoleActionSSS("GPS", testGpsParser);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue