Changeset 359

Show
Ignore:
Timestamp:
04/30/08 22:06:49 (2 weeks ago)
Author:
ingy
Message:
Got '*' selector working.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ingy/pQuery/lib/pQuery.pm

    r356 r359  
    384384# Selector functions 
    385385################################################################################ 
    386 my $chars = '(?:[\w\x{128}-\x{FFFF}_-]|\\.)'; 
     386my $chars = '(?:[\w\x{128}-\x{FFFF}*_-]|\\.)'; 
    387387my $quickChild = qr/^>\s*($chars+)/; 
    388388my $quickId = qr/^($chars+)(#)($chars+)/; 
     
    534534    } 
    535535#     $ret = [] if $t; 
    536     die "selector error" if $t; 
     536    die "selector error: $t" if $t; 
    537537 
    538538    shift(@$ret) if $ret and @$ret and $context == $ret->[0]; 
  • trunk/src/ingy/pQuery/t/selectors.t

    r358 r359  
    1 use t::TestpQuery tests => 13
     1use t::TestpQuery tests => 15
    22 
    33use pQuery; 
     
    55pQuery('t/spreadily.html'); 
    66 
    7 # is pQuery('*')->size, 30, '* finds all'; 
    8 # exit; 
     7is pQuery('*')->size, 76, '* finds all'; 
    98is pQuery('h3')->text, 'The Intarweb is a Spreadsheet!', 
    109    'select an element by tag name'; 
     
    3938    '3 tds contain Blue'; 
    4039 
    41 # is pQuery('*:header')->size, 2, 
    42 #     'Two Headers'; 
     40is pQuery('*:header')->size, 2, 
     41    'Two Headers'; 
    4342 
    4443is pQuery(':header')->size, 2,