2 test-mala_stdmodule.c - MaLa stdandard module test suite
4 Copyright (C) 2004, Christian Thaeter <chth@gmx.net>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, contact me.
26 main(int argc
, char * argv
[])
29 //MalaStringListNode pptr;
34 my_engine
= mala_engine_new ();
35 mala_module_std_init (my_engine
);
36 mala_engine_ppexpand_define (my_engine
, "--COMMANDLINE", argc
- 1, argv
+ 1);
37 mala_engine_pushback_word (my_engine
, "--COMMANDLINE");
39 mala_engine_step (my_engine
);
40 //pptr = mala_stringlist_head ( mala_engine_getprogram (my_engine));
41 //mala_engine_arg_eval (my_engine, &pptr, 0, 1, NULL);
43 mala_engine_dumpargs (my_engine
, stdout
, "arg: ", "\n");
44 mala_engine_dumpprogram (my_engine
, stdout
, "prg: ", "\n");
46 printf ("variable: %s\n", getenv ("variable"));
47 printf ("negated: %d\n", mala_engine_negated (my_engine
));
48 printf ("state: %s\n", mala_engine_state_str (my_engine
));
50 mala_engine_free (my_engine
);
59 // c-file-style: "gnu"
61 // arch-tag: 2ce6015a-6da8-4ad9-ab3c-602347445b93