Changeset 3513:43a4063dcc3b in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/15/08 12:46:06 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add test for slice expressions with the first index missing.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • test/test_ul4.py

    r3512 r3513  
    448448    check("gurk", "<?print 'gurk'[-10:]?>") 
    449449    check("gurk", "<?print x[-10:]?>", x="gurk") 
     450 
     451 
     452def test_getslice2(): 
     453    check("gur", "<?print 'gurk'[:3]?>") 
     454    check("gur", "<?print x[:3]?>", x="gurk") 
     455    check("gur", "<?print 'gurk'[:-1]?>") 
     456    check("gur", "<?print x[:-1]?>", x="gurk") 
     457    check("gurk", "<?print 'gurk'[:10]?>") 
     458    check("gurk", "<?print x[:10]?>", x="gurk") 
     459    check("", "<?print 'gurk'[:-5]?>") 
     460    check("", "<?print x[:-5]?>", x="gurk") 
    450461 
    451462