Changeset 978


Ignore:
Timestamp:
Jun 25, 2012 10:12:12 PM (11 years ago)
Author:
jemian
Message:
 
Location:
specdomain/trunk/src/specdomain/test
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • specdomain/trunk/src/specdomain/test/tester.py

    r935 r978  
    22
    33#  $Id$
     4
     5
     6'''test various regular expressions to match macro declarations'''
    47
    58
     
    103106cdef("config_mac", "{PLOT_CNTRS_MAX = COUNTERS}", "PLOT_Y", 0x10 )
    104107'''
    105 f = open('cdef-examples.mac', 'r')
    106 buf = f.read()
    107 f.close()
     108buf = open('../macros/cdef-examples.mac', 'r').read()
    108109test_cases += buf
    109110tester(test_cases, spec_func_re)
  • specdomain/trunk/src/specdomain/test/tester2.py

    r936 r978  
    55
    66"""
     7test various regular expressions to locate arguments
     8to cdef for a particular case from standard.mac
    79"""
    810
     
    3840                     , re.IGNORECASE|re.DOTALL)
    3941
    40 for regexp in (arg1_re, arg2_re, arg3_re, arg4_re):
     42for i, regexp in enumerate((arg1_re, arg2_re, arg3_re, arg4_re)):
    4143    m = regexp.match(s)
    4244    if m is not None:
    43         print m.groups()
     45        print i, m.groups()
Note: See TracChangeset for help on using the changeset viewer.