Conform to my unwritten, undocumented style rules.
[Akkordarbeit.git] / features / akkordarbeit.feature
blob97c5220f2609f1bc3c9674e8f4cfe103a1c61038
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     """
65 Feature: Text Output
66   In order to view the chord files
67   As a user
68   I want to get a text output
71   Scenario: Text Output of a simple Song
72     Given the parsetree
73     """
74     [
75       [
76         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer']
77       ]
78     ]
79     """
81     When I format it
82     Then the output should be
83     """
84     [D]            [Em]
85     Do what I say, or I will suffer
88     """
90   Scenario: Text Output of a simple Song with one Section and two lines
91     Given the parsetree
92     """
93     [
94       [
95         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
96         ['Do what ', '[D]', 'I say, ', '[Em]', 'or I will suffer']
97       ]
98     ]
99     """
101     When I format it
102     Then the output should be
103     """
104     [D]            [Em]
105     Do what I say, or I will suffer
106             [D]    [Em]
107     Do what I say, or I will suffer
110     """
112   Scenario: Text Output of a simple Song with two Section and two lines
113     Given the parsetree
114     """
115     [
116       [
117         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
118         ['Do what ', '[D]', 'I say, ', '[Em]', 'or I will suffer']
119       ],
120       [
121         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
122         ['Do what ', '[D]', 'I say, ', '[Em]', 'or I will suffer']
123       ]
124     ]
125     """
127     When I format it
128     Then the output should be
129     """
130     [D]            [Em]
131     Do what I say, or I will suffer
132             [D]    [Em]
133     Do what I say, or I will suffer
135     [D]            [Em]
136     Do what I say, or I will suffer
137             [D]    [Em]
138     Do what I say, or I will suffer
141     """