char c;
/* This is how many tests you plan to run */
- plan_tests(13);
+ plan_tests(15);
pipe(readyfd);
pipe(exitfd);
ok1(connect(sfd1, &u.addr, sizeof(u.in)) == 0);
ok1(connect(sfd2, &u.addr, sizeof(u.in)) == 0);
+ ok1(input_is(sfd1, "Welcome. Please ask your question.\n"));
+ ok1(input_is(sfd2, "Welcome. Please ask your question.\n"));
+
ok1(write_sall(sfd1, "question"));
ok1(write_sall(sfd2, "question"));
/* It shouldn't say anything until we've finished! */
ok1(write_sall(sfd1, " 1\n"));
ok1(write_sall(sfd2, " 2\n"));
- ok1(input_is(sfd1, "QUESTION 1\n"));
- ok1(input_is(sfd2, "QUESTION 2\n"));
+ ok1(input_is(sfd1, "Our answer is:\nQUESTION 1\n"));
+ ok1(input_is(sfd2, "Our answer is:\nQUESTION 2\n"));
/* Sockets should be dead now. */
ok1(read(sfd1, &c, 1) == 0);