@@ -42,57 +42,57 @@ suite('Test Go Test Args', () => {
42
42
43
43
test ( 'default config' , ( ) => {
44
44
runTest ( {
45
- expectedArgs : 'test -timeout 30s ./...' ,
46
- expectedOutArgs : 'test -timeout 30s ./...'
45
+ expectedArgs : 'test ./... -timeout 30s ' ,
46
+ expectedOutArgs : 'test ./... -timeout 30s '
47
47
} ) ;
48
48
} ) ;
49
49
test ( 'user flag [-v] enables -json flag' , ( ) => {
50
50
runTest ( {
51
- expectedArgs : 'test -timeout 30s -json ./... -v' ,
52
- expectedOutArgs : 'test -timeout 30s ./... -v' ,
51
+ expectedArgs : 'test ./... -timeout 30s -json -v' ,
52
+ expectedOutArgs : 'test ./... -timeout 30s -json -v' ,
53
53
flags : [ '-v' ]
54
54
} ) ;
55
55
} ) ;
56
56
test ( 'user flag [-json -v] prevents -json flag addition' , ( ) => {
57
57
runTest ( {
58
- expectedArgs : 'test -timeout 30s ./... -json -v' ,
59
- expectedOutArgs : 'test -timeout 30s ./... -json -v' ,
58
+ expectedArgs : 'test ./... -timeout 30s -json -v' ,
59
+ expectedOutArgs : 'test ./... -timeout 30s -json -v' ,
60
60
flags : [ '-json' , '-v' ]
61
61
} ) ;
62
62
} ) ;
63
63
test ( 'user flag [-args] does not crash' , ( ) => {
64
64
runTest ( {
65
- expectedArgs : 'test -timeout 30s ./... -args' ,
66
- expectedOutArgs : 'test -timeout 30s ./... -args' ,
65
+ expectedArgs : 'test ./... -timeout 30s -args' ,
66
+ expectedOutArgs : 'test ./... -timeout 30s -args' ,
67
67
flags : [ '-args' ]
68
68
} ) ;
69
69
} ) ;
70
70
test ( 'user flag [-args -v] does not enable -json flag' , ( ) => {
71
71
runTest ( {
72
- expectedArgs : 'test -timeout 30s ./... -args -v' ,
73
- expectedOutArgs : 'test -timeout 30s ./... -args -v' ,
72
+ expectedArgs : 'test ./... -timeout 30s -args -v' ,
73
+ expectedOutArgs : 'test ./... -timeout 30s -args -v' ,
74
74
flags : [ '-args' , '-v' ]
75
75
} ) ;
76
76
} ) ;
77
77
test ( 'specifying functions adds -run flags' , ( ) => {
78
78
runTest ( {
79
- expectedArgs : 'test -timeout 30s -run ^(TestA|TestB)$ ./... ' ,
80
- expectedOutArgs : 'test -timeout 30s -run ^(TestA|TestB)$ ./... ' ,
79
+ expectedArgs : 'test ./... -timeout 30s -run ^(TestA|TestB)$' ,
80
+ expectedOutArgs : 'test ./... -timeout 30s -run ^(TestA|TestB)$' ,
81
81
functions : [ 'TestA' , 'TestB' ]
82
82
} ) ;
83
83
} ) ;
84
84
test ( 'functions & benchmark adds -bench flags and skips timeout' , ( ) => {
85
85
runTest ( {
86
- expectedArgs : 'test -benchmem -run=^$ -bench ^(TestA|TestB)$ ./... ' ,
87
- expectedOutArgs : 'test -benchmem -run=^$ -bench ^(TestA|TestB)$ ./... ' ,
86
+ expectedArgs : 'test ./... -benchmem -run=^$ -bench ^(TestA|TestB)$' ,
87
+ expectedOutArgs : 'test ./... -benchmem -run=^$ -bench ^(TestA|TestB)$' ,
88
88
functions : [ 'TestA' , 'TestB' ] ,
89
89
isBenchmark : true
90
90
} ) ;
91
91
} ) ;
92
92
test ( 'user -run flag is ignored when functions are provided' , ( ) => {
93
93
runTest ( {
94
- expectedArgs : 'test -timeout 30s -run ^(TestA|TestB)$ ./... ' ,
95
- expectedOutArgs : 'test -timeout 30s -run ^(TestA|TestB)$ ./... ' ,
94
+ expectedArgs : 'test ./... -timeout 30s -run ^(TestA|TestB)$' ,
95
+ expectedOutArgs : 'test ./... -timeout 30s -run ^(TestA|TestB)$' ,
96
96
functions : [ 'TestA' , 'TestB' ] ,
97
97
flags : [ '-run' , 'TestC' ]
98
98
} ) ;
0 commit comments