# Hand crafted tests for GNU M4. -*- Autotest -*- # Copyright 2001 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AT_BANNER([Options.]) ## ------------------ ## ## Discard comments. ## ## ------------------ ## AT_SETUP([Discard comments]) AT_DATA([[in]], [[This is not a comment # but this is. # This line should dissappear completely. This should not disappear. changecom(`') html ends. ]]) AT_CHECK_M4([-c in], 0, [[This is not a comment This should not disappear. html ends. ]]) AT_CLEANUP ## ------------------ ## ## import-environment ## ## ------------------ ## AT_SETUP([import-environment]) AT_DATA([[in]], [[`TEST'=TEST `ZAPPED'=ZAPPED `OVERRIDE'=OVERRIDE ]]) TEST='This is an environment variable' export TEST ZAPPED='This is an environment variable which we will delete' export ZAPPED OVERRIDE='This is an environment variable which we will change' export OVERRIDE AT_CHECK_M4([--import-environment -UZAPPED -DOVERRIDE='It is changed.' in], 0, [[TEST=This is an environment variable ZAPPED=ZAPPED OVERRIDE=It is changed. ]]) AT_CLEANUP