File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Testscript for exercising adding packages
2
+
3
+ # exec devbox init
4
+ exec devbox install
5
+ ! exec rg --version
6
+ ! exec vim --version
7
+
8
+ # First, add a --platform, and verify that the []string packages
9
+ # becomes a map[string]any packages
10
+ exec devbox add ripgrep --platform x86_64-darwin
11
+ json.superset devbox.json expected_devbox1.json
12
+
13
+ # Second, add another platform: verify that it adds to the platforms array
14
+ exec devbox add ripgrep --platform x86_64-linux
15
+ # Third, add an excluded-platform too
16
+ exec devbox add vim --exclude-platform x86_64-linux
17
+
18
+ json.superset devbox.json expected_devbox2.json
19
+
20
+ -- devbox.json --
21
+ {
22
+ "packages": [
23
+ "hello",
24
+ "cowsay@latest"
25
+ ]
26
+ }
27
+
28
+ -- expected_devbox1.json --
29
+ {
30
+ "packages": {
31
+ "hello": "",
32
+ "cowsay": "latest",
33
+ "ripgrep": {
34
+ "version": "latest",
35
+ "platforms": ["x86_64-darwin"]
36
+ }
37
+ }
38
+ }
39
+
40
+ -- expected_devbox2.json --
41
+ {
42
+ "packages": {
43
+ "hello": "",
44
+ "cowsay": "latest",
45
+ "ripgrep": {
46
+ "version": "latest",
47
+ "platforms": ["x86_64-darwin", "x86_64-linux"]
48
+ },
49
+ "vim": {
50
+ "version": "latest",
51
+ "excluded_platforms": ["x86_64-linux"]
52
+ }
53
+ }
54
+ }
You can’t perform that action at this time.
0 commit comments