!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/4Suite/tests/Xml/Xslt/Core/   drwxr-xr-x
Free 4.89 GB of 27.03 GB (18.1%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_patterns.py (2.25 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# XPatternParser Test patterns
import sys, cStringIO

class TestCase:
    def __init__(self, pattern, expected=None):
        self.pattern = pattern
        self.expected = expected or pattern


patterns = [TestCase('para'),
            TestCase('*'),
            TestCase('chapter | appendix'),
            TestCase('olist/item'),
            TestCase('appendix//para'),
            TestCase('/'),
           TestCase('text()'),
            TestCase('processing-instruction()'),
            TestCase('node()'),
            TestCase('id("W11")'),
            TestCase('para[1]'),
            TestCase('*[position()=1 and self::para]',
                     '*[position() = 1 and self::para]'),
            TestCase('para[last()=1]', 'para[last() = 1]'),
            TestCase('items/item[position()>1]',
                     'items/item[position() > 1]'),
            TestCase('item[(position() mod 2) = 1]',
                     'item[position() mod 2 = 1]'),
            TestCase('div[@class="appendix"]//p',
                     'div[attribute::class = "appendix"]//p'),
            TestCase('@class'),
            TestCase('@*'),
            TestCase('@class[.="appendix"]',
                     '@class[. = "appendix"]'),
            TestCase('appendix//ulist/item[position()=1]',
                     'appendix//ulist/item[position() = 1]'),
            TestCase('* | /'),
            TestCase('text() | @*'),
            ]

from Ft.Xml.Xslt import parser
parsers = [('Default', parser)]
try:
    from Ft.Xml.Xslt import XPatternParser
    parsers.append(('BisonGen Python Parser', XPatternParser))
except:
    pass
try:
    from Ft.Xml.Xslt import XPatternParserc
    parsers.append(('BisonGen C Parser', XPatternParserc))
except:
    pass

def Test(tester):
    for (name, factory) in parsers:
        parser = factory.new()
        tester.startGroup('%s (%s)' % (name, factory.__name__))
        for case in patterns:
            tester.startTest(case.pattern)
            result = parser.parse(case.pattern)
            sys.stdout = cStringIO.StringIO()
            result.pprint()
            msg = sys.stdout.getvalue()
            sys.stdout = sys.__stdout__
            tester.compare(case.expected, repr(result), msg)
            tester.testDone()
        tester.groupDone()

    return

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0032 ]--