Skip to content

Commit 8de6e57

Browse files
committed
test: for devx
1 parent d9d9b2b commit 8de6e57

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

cli/cmd/main_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ func TestScan(t *testing.T) {
3232
})
3333
}
3434

35+
func TestDevX(t *testing.T) {
36+
testscript.Run(t, testscript.Params{
37+
Dir: "testdata/devx",
38+
})
39+
}
40+
3541
func mockEarthly() int {
3642
for _, arg := range os.Args {
3743
fmt.Println(arg)

cli/cmd/testdata/devx/1.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
exec git init .
2+
3+
exec forge devx ./Developer.md run-some-command
4+
cmp stdout expect.txt
5+
6+
-- Developer.md --
7+
# My cool dev docs
8+
9+
### Run Some Command !!
10+
11+
``` sh
12+
echo "should run this command (1)"
13+
```
14+
15+
``` sh
16+
echo "should not run this command (1)"
17+
```
18+
-- expect.txt --
19+
should run this command (1)

0 commit comments

Comments
 (0)