/
dlang.feature
65 lines (60 loc) · 1.67 KB
/
dlang.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Feature: Running the binary on a D build description results in a working build
As a reggae user
I want to write build descriptions in D
So I can build software easily
Background:
Given a file named "proj/reggaefile.d" with:
"""
import reggae;
enum mainObj = Target(`main.o`,
`dmd -c -of$out $in`,
[Target(`src/main.d`)]);
mixin build!(Target(`leapp`, `dmd -of$out $in`, mainObj));
"""
And a file named "proj/src/main.d" with:
"""
import std.stdio;
void main() {
writeln(`Hello world!`);
}
"""
@ninja
Scenario: End to end with ninja
Given I successfully run `reggae -b ninja proj`
And I successfully run `ninja`
When I successfully run `./leapp`
Then the output should contain:
"""
Hello world!
"""
@make
Scenario: End to end with make
Given I successfully run `reggae -b make proj`
And I successfully run `make`
When I successfully run `./leapp`
Then the output should contain:
"""
Hello world!
"""
@tup
Scenario: End to end with tup
Given I successfully run `reggae -b tup proj`
And I successfully run `tup`
When I successfully run `./leapp`
Then the output should contain:
"""
Hello world!
"""
@binary
Scenario: End to end with binary
Given I successfully run `reggae -b binary proj`
Given I successfully run `./build`
Then the output should contain:
"""
[build] dmd -ofleapp objs/leapp.objs/main.o
"""
When I successfully run `./leapp`
Then the output should contain:
"""
Hello world!
"""