/[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.34 by akim, Mon Apr 29 13:29:40 2002 UTC revision 1.35 by akim, Sat Sep 28 14:10:11 2002 UTC
# Line 272  AT_CHECK_M4SH Line 272  AT_CHECK_M4SH
272  AT_CHECK([./script])  AT_CHECK([./script])
273    
274  AT_CLEANUP  AT_CLEANUP
275    
276    
277    
278    
279    ## ------------------- ##
280    ## Functions Support.  ##
281    ## ------------------- ##
282    
283    # Hypothesis: the shell we are running, after having checked for
284    # $LINENO support, supports functions.
285    
286    AT_SETUP([Functions Support])
287    
288    AT_DATA_M4SH([script.as],
289    [[AS_INIT
290    _AS_LINENO_PREPARE
291    
292    func_return () {
293      (exit $1)
294    }
295    
296    func_success () {
297      func_return 0
298    }
299    
300    func_failure () {
301      func_return 1
302    }
303    
304    if func_success; then
305      if func_failure; then
306        AS_ERROR([func_failure passed])
307      fi
308    else
309      AS_ERROR([func_success failed])
310    fi
311    ]])
312    
313    AT_CHECK_M4SH
314    AT_CHECK([./script])
315    
316    AT_CLEANUP
317    
318    
319    
320    
321    ## ------------------------------ ##
322    ## Functions and return Support.  ##
323    ## ------------------------------ ##
324    
325    # Hypothesis: the shell we are running, after having checked for
326    # $LINENO support, supports functions, and the `return' keyword.
327    
328    AT_SETUP([Functions and return Support])
329    
330    AT_DATA_M4SH([script.as],
331    [[AS_INIT
332    _AS_LINENO_PREPARE
333    
334    func_success () {
335      return 0
336    }
337    
338    func_failure () {
339      return 1
340    }
341    
342    if func_success; then
343      if func_failure; then
344        AS_ERROR([func_failure passed])
345      fi
346    else
347      AS_ERROR([func_success failed])
348    fi
349    ]])
350    
351    AT_CHECK_M4SH
352    AT_CHECK([./script])
353    
354    AT_CLEANUP

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

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