Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 24 lines (20 sloc) 0.55 kb
c6d4b4bc »
2010-07-24 Introduced compatibility with Ruby 1.9.2 rc2 (Thanks Simon Haydon). In
1 require File.expand_path('../helper', __FILE__)
0731b282 »
2010-05-07 Added Labels. Nearing first stable release
2
3 class LabelTest < Test::Unit::TestCase
7f32be29 »
2010-12-07 Eliminate Label, Predicate, and List classes.
4 def test_to_s
5 rule = Rule.for('a')
6 rule.label = 'a_label'
7 assert_equal('a_label:"a"', rule.to_s)
ca9def77 »
2010-11-16 Fixed Label match naming bug
8 end
9
7f32be29 »
2010-12-07 Eliminate Label, Predicate, and List classes.
10 def test_to_s_sequence
11 rule = Sequence.new(%w< a b >)
12 rule.label = 's_label'
13 assert_equal('s_label:("a" "b")', rule.to_s)
14 end
0731b282 »
2010-05-07 Added Labels. Nearing first stable release
15
7f32be29 »
2010-12-07 Eliminate Label, Predicate, and List classes.
16 def test_to_s_embedded
17 a = Rule.for('a')
18 a.label = 'a_label'
19 rule = Sequence.new([ a, 'b' ])
20 rule.label = 's_label'
21 assert_equal('s_label:(a_label:"a" "b")', rule.to_s)
0731b282 »
2010-05-07 Added Labels. Nearing first stable release
22 end
23 end
Something went wrong with that request. Please try again.