Release version 0.0.3b.
[Akkordarbeit.git] / features / parser.feature
blob10f857e74273ad80a176b2ebf1f942883ff96283
1 Feature: Parsing
2   In order to seperate backend and frontend
3   As a backend writer
4   I want to get a parsetree
6   Scenario: Simple Song
7     Given the song
8     """
9     [D]Do what I say, [Em]or I will suffer
10     """
12     When I parse it
13     Then the parsetree should be
14     """
15     [
16       [
17         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer']
18       ]
19     ]
20     """
22   Scenario: Simple Song Multiline
23     Given the song 
24     """
25     [D]Do what I say, [Em]or I will suffer
26     [D]Do what I say, [Em]or I will suffer
27     """
29     When I parse it
30     Then the parsetree should be
31     """
32     [
33       [
34         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
35         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer']
36       ]
37     ]
38     """
40   Scenario: Song with two sections
41     Given the song 
42     """
43     [D]Do what I say, [Em]or I will suffer
44     [D]Do what I say, [Em]or I will suffer
46     [D]Do what I say, [Em]or I will suffer
47     [D]Do what I say, [Em]or I will suffer
48     """
50     When I parse it
51     Then the parsetree should be
52     """
53     [
54       [
55         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
56         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer']
57       ],
58       [
59         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
60         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer']
61       ]
62     ]
63     """