Bug #21128. Reviewed by John Darrington.
[pspp-builds.git] / src / ui / terminal / main.c
index 9143220d3147accd05b935481909c22b1d6b1faa..46ded354f7e392903c61d93712d0ad8baff38610 100644 (file)
@@ -107,12 +107,19 @@ main (int argc, char **argv)
   settings_init ();
   random_init ();
 
-  the_dataset = create_dataset (NULL, NULL);
+  the_dataset = create_dataset ();
 
   if (parse_command_line (argc, argv, the_source_stream))
     {
       msg_ui_init (the_source_stream);
-      outp_read_devices ();
+      if (!get_testing_mode ())
+        outp_read_devices ();
+      else
+        outp_configure_driver_line (
+          ss_cstr ("raw-ascii:ascii:listing:width=9999 length=9999 "
+                   "output-file=\"pspp.list\" emphasis=none "
+                   "headers=off paginate=off squeeze=on "
+                   "top-margin=0 bottom-margin=0"));
       the_lexer = lex_create (the_source_stream);
 
       for (;;)
@@ -143,7 +150,9 @@ i18n_init (void)
 #if HAVE_LC_MESSAGES
   setlocale (LC_MESSAGES, "");
 #endif
-  setlocale (LC_MONETARY, "");
+#if HAVE_LC_PAPER
+  setlocale (LC_PAPER, "");
+#endif
   bindtextdomain (PACKAGE, locale_dir);
   textdomain (PACKAGE);
 #endif /* ENABLE_NLS */