02c2bb1121d068e60621c3429ec0929371788cd7 angie Thu Dec 14 13:00:25 2017 -0800 The change to count blank lines as output caused trouble in the absence of results because the 'no results' message included blank lines for emphasis. If output starts with the 'no results' message then skip it so its blank lines aren't counted. refs #20534 note-9 diff --git src/hg/hgTablesTest/hgTablesTest.c src/hg/hgTablesTest/hgTablesTest.c index a784a27..9eacd33 100644 --- src/hg/hgTablesTest/hgTablesTest.c +++ src/hg/hgTablesTest/hgTablesTest.c @@ -336,31 +336,34 @@ { struct htmlFormVar *var; for (var = list; var != NULL; var = var->next) { if (startsWith(prefix, var->name)) return var; } return NULL; } void checkExpectedSimpleRows(struct htmlPage *outPage, int expectedRows) /* Make sure we got the number of rows we expect. */ { if (outPage != NULL) { - int rowCount = countNoncommentLines(outPage->htmlText); + char *results = outPage->htmlText; + if (startsWith(NO_RESULTS, results)) + results += strlen(NO_RESULTS); + int rowCount = countNoncommentLines(results); if (rowCount != expectedRows) qaStatusSoftError(tablesTestList->status, "Got %d rows, expected %d", rowCount, expectedRows); } } void testOneField(struct htmlPage *tablePage, struct htmlForm *mainForm, char *org, char *db, char *group, char *track, char *table, int expectedRows) /* Get one field and make sure the count agrees with expected. */ /* mainForm not used */ { struct htmlPage *outPage; struct htmlForm *form; struct htmlFormVar *var;