Add support for song titles.
[Akkordarbeit.git] / features / text_formatter.feature
blob69e4cdb499d54ab6a70742819d861bde97d7ab58
1 Feature: Text Output
2   In order to view the chord files
3   As a user
4   I want to get a text output
6   Scenario: Text Output of a simple Song
7     Given the parsetree
8     """
9     [
10       [
11         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer']
12       ]
13     ]
14     """
16     When I format it as text
17     Then the output should be
18     """
19     [D]            [Em]
20     Do what I say, or I will suffer
22     """
24   Scenario: Text Output of a simple Song with one Section and two lines
25     Given the parsetree
26     """
27     [
28       [
29         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
30         ['Do what ', '[D]', 'I say, ', '[Em]', 'or I will suffer']
31       ]
32     ]
33     """
35     When I format it as text
36     Then the output should be
37     """
38     [D]            [Em]
39     Do what I say, or I will suffer
40             [D]    [Em]
41     Do what I say, or I will suffer
43     """
45   Scenario: Text Output of a simple Song with two Section and two lines
46     Given the parsetree
47     """
48     [
49       [
50         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
51         ['Do what ', '[D]', 'I say, ', '[Em]', 'or I will suffer']
52       ],
53       [
54         ['[D]', 'Do what I say, ', '[Em]', 'or I will suffer'],
55         ['Do what ', '[D]', 'I say, ', '[Em]', 'or I will suffer']
56       ]
57     ]
58     """
60     When I format it as text
61     Then the output should be
62     """
63     [D]            [Em]
64     Do what I say, or I will suffer
65             [D]    [Em]
66     Do what I say, or I will suffer
68     [D]            [Em]
69     Do what I say, or I will suffer
70             [D]    [Em]
71     Do what I say, or I will suffer
73     """
75   Scenario: Title
76     Given the title Awesome Song
77     And the parsetree
78     """
79     [
80       [
81         ['Text']
82       ]
83     ]
84     """
86     When I format it as text
87     Then the output should be
88     """
89     ==============
90      Awesome Song
91     ==============
92     
93     Text
95     """