diff options
Diffstat (limited to 'tests/incl02.at')
-rw-r--r-- | tests/incl02.at | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/incl02.at b/tests/incl02.at new file mode 100644 index 0000000..edf83c3 --- /dev/null +++ b/tests/incl02.at @@ -0,0 +1,51 @@ +# This file is part of grecs -*- Autotest -*- +# Copyright (C) 2014 Sergey Poznyakoff +# +# Grecs is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# Grecs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Grecs. If not, see <http://www.gnu.org/licenses/>. + +AT_SETUP([Include once]) +AT_KEYWORDS([include incl02]) + +AT_CHECK([ +AT_DATA([a.inc],[a true; +]) + +AT_DATA([test1.cf],[before 1; +#include "a.inc" +#include "a.inc" +after 1; +]) + +AT_DATA([test2.cf],[before 1; +#include_once "a.inc" +#include_once "a.inc" +after 1; +]) + +gcffmt ./test1.cf +echo == +gcffmt ./test2.cf +], +[0], +[.before: "1" +.a: "true" +.a: "true" +.after: "1" +== +.before: "1" +.a: "true" +.after: "1" +]) + +AT_CLEANUP |