X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Foutput%2Frender-test.c;h=5f4c1da00bc5313d98558e9bfa702981f1929e3b;hb=refs%2Fbuilds%2F20130126030502%2Fpspp;hp=0376e5b49b08ed60ada321424f241ab54fdaeb7a;hpb=faa1da8f10b1e22c7b1ec37e9cbcb94cbd8b4260;p=pspp diff --git a/tests/output/render-test.c b/tests/output/render-test.c index 0376e5b49b..5f4c1da00b 100644 --- a/tests/output/render-test.c +++ b/tests/output/render-test.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -361,6 +361,7 @@ draw (FILE *stream) while (fgets (buffer, sizeof buffer, stream)) { char text[sizeof buffer]; + int length; int emph; int x, y; @@ -368,9 +369,11 @@ draw (FILE *stream) if (strchr ("#\r\n", buffer[0])) continue; - if (sscanf (buffer, "%d %d %d %[^\n]", &x, &y, &emph, text) != 4) + if (sscanf (buffer, "%d %d %d %[^\n]", &x, &y, &emph, text) == 4) + ascii_test_write (ascii_driver, text, x, y, emph ? TAB_EMPH : 0); + else if (sscanf (buffer, "set-length %d %d", &y, &length) == 2) + ascii_test_set_length (ascii_driver, y, length); + else error (1, 0, "line %d has invalid format", line); - - ascii_test_write (ascii_driver, text, x, y, emph ? TAB_EMPH : 0); } }