mode_count++;
tt.mode = MODE_SINGLE;
lex_match (lexer, T_EQUALS);
- lex_force_num (lexer);
+ if (!lex_force_num (lexer))
+ goto parse_failed;
testval = lex_number (lexer);
lex_get (lexer);
}
if ( lex_match_id (lexer, "CIN") || lex_force_match_id (lexer, "CI"))
if ( lex_force_match (lexer, T_LPAREN))
{
- lex_force_num (lexer);
+ if (!lex_force_num (lexer))
+ goto parse_failed;
tt.confidence = lex_number (lexer);
lex_get (lexer);
lex_force_match (lexer, T_RPAREN);
AT_CHECK([pspp t-test-crs.sps], [0],[ignore], [ignore])
AT_CLEANUP
+
+
+
+dnl Tests for a bug assert failed when a non-number was passes as the p value
+AT_SETUP([T-TEST non number p value])
+AT_DATA([t.sps], [dnl
+data list list /age d_frage_1 weight height *.
+begin data.
+1 2 3 1
+4 5 6 2
+end data.
+
+T-TEST /VARIABLES=age weight height
+ /GROUPS=d_frage_1(1,0) /MISSING=ANALYSIS /CRITERIA=CIN(p.95).
+])
+
+AT_CHECK([pspp t.sps], [1],[ignore], [ignore])
+
+AT_CLEANUP
+