/[autoconf]/autoconf/tests/m4sh.at
ViewVC logotype

Diff of /autoconf/tests/m4sh.at

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by akim, Mon Jun 23 11:11:42 2003 UTC revision 1.38 by bonzini, Mon Nov 24 10:44:53 2003 UTC
# Line 350  AT_CHECK([./script]) Line 350  AT_CHECK([./script])
350    
351  AT_CLEANUP  AT_CLEANUP
352    
353    
354    ## ------------------------------------ ##
355    ## AS_REQUIRE_SHELL_FN and m4_require.  ##
356    ## ------------------------------------ ##
357    
358    # Hypothesis: M4sh expands the requirements of AS_REQUIRE_SHELL_FN
359    # in the main diversion, and not in M4SH-INIT.
360    
361    AT_SETUP([AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require])
362    
363    AT_DATA_M4SH([script.as], [[dnl
364    AS_INIT
365    
366    m4_defun([in_m4_sh_init], still_in_m4sh_init=yes)
367    m4_defun([not_in_m4_sh_init], still_in_m4sh_init=no)
368    
369    m4_defun([error_if_emitted_in_m4sh_init], [
370      if test x$still_in_m4sh_init = xyes; then
371        AS_ERROR([requirement emitted in M4SH-INIT])
372      fi
373    ])
374    
375    m4_defun([TEST_FUNC_BODY], [
376    m4_require([error_if_emitted_in_m4sh_init])
377    : echo in shell function, with parameter = [$]1
378    ])
379    
380    
381    m4_defun([test_init], [
382    AS_REQUIRE([in_m4_sh_init])
383    AS_REQUIRE_SHELL_FN([test_func], [TEST_FUNC_BODY])
384    AS_REQUIRE([not_in_m4_sh_init])
385    ])
386    
387    test_init
388    test_func parameter1
389    ]])
390    
391    AT_CHECK_M4SH
392    AT_CHECK([./script])
393    
394    AT_CLEANUP
395    
396    
397  ## -------------- ##  ## -------------- ##
398  ## AS_HELP_STRING ##  ## AS_HELP_STRING ##
399  ## -------------- ##  ## -------------- ##

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26