@@ -220,13 +220,17 @@ You can install HLint with Stack. You might want to install it in the global
220
220
project in case you run into dependency conflicts. HLint can report hints in
221
221
your favourite text editor. Refer to the HLint repository for more details.
222
222
223
- To install:
223
+ To install, command :
224
224
225
- stack install hlint
225
+ ~~~ text
226
+ stack install hlint
227
+ ~~~
226
228
227
- Once installed, you can check your changes with:
229
+ Once installed, you can check your changes with command :
228
230
229
- $ ./etc/scripts/hlint.sh
231
+ ~~~ text
232
+ stack exec -- sh ./etc/scripts/hlint.sh
233
+ ~~~
230
234
231
235
## Testing
232
236
@@ -236,11 +240,11 @@ be found in the
236
240
folder and unit tests, in the
237
241
[ src/test] ( https://github.com/commercialhaskell/stack/tree/master/src/test )
238
242
folder. Tests are written using the [ Hspec] ( https://hspec.github.io/ ) framework.
239
- In order to run the full test suite, you can simply do :
243
+ In order to run the full test suite, you can simply command :
240
244
241
- ``` bash
242
- $ stack test
243
- ```
245
+ ~~~ text
246
+ stack test
247
+ ~~~
244
248
245
249
The ` --file-watch ` is a very useful option to get quick feedback. However,
246
250
running the entire test suite after each file change will slow you down. You'll
@@ -250,59 +254,59 @@ description of this follows below.
250
254
251
255
### Working with Unit Tests
252
256
253
- If you would like to run the unit tests on their own, you can:
257
+ If you would like to run the unit tests on their own, you can command :
254
258
255
- ``` bash
256
- $ stack test stack:stack-test
257
- ```
259
+ ~~~ text
260
+ stack test stack:stack-test
261
+ ~~~
258
262
259
- Running an individual module works like this:
263
+ Running an individual module works with a command like this:
260
264
261
- ``` bash
262
- $ stack test stack:stack-test --ta " -m <PATTERN>"
263
- ```
265
+ ~~~ text
266
+ stack test stack:stack-test --ta "-m <PATTERN>"
267
+ ~~~
264
268
265
269
Where ` <PATTERN> ` is the name of the module without ` Spec.hs ` .
266
270
267
- You may also load tests into GHCi and run them with:
271
+ You may also load tests into GHCi and run them with these command :
268
272
269
- ``` bash
270
- $ stack ghci stack:stack-test --only-main
273
+ ~~~ text
274
+ stack ghci stack:stack-test --only-main
271
275
# GHCi starting up output ...
272
276
> :main -m "<PATTERN>"
273
- ```
277
+ ~~~
274
278
275
279
Where again, ` <PATTERN> ` is the name of the module without ` Spec.hs ` .
276
280
277
281
### Working with Integration Tests
278
282
279
- Running the integration tests is a little involved, you'll need to:
283
+ Running the integration tests is a little involved, you'll need to command :
280
284
281
- ``` bash
282
- $ stack build --flag stack:integration-tests stack --exec stack-integration-test
283
- ```
285
+ ~~~ text
286
+ stack build --flag stack:integration-tests stack --exec stack-integration-test
287
+ ~~~
284
288
285
- Running an individual module works like this:
289
+ Running an individual module works with a command like this:
286
290
287
- ``` bash
288
- $ stack build --flag stack:integration-tests stack --exec " stack-integration-test -m <PATTERN>"
289
- ```
291
+ ~~~ text
292
+ stack build --flag stack:integration-tests stack --exec "stack-integration-test -m <PATTERN>"
293
+ ~~~
290
294
291
295
Where ` <PATTERN> ` is the name of the folder listed in the
292
296
[ test/integration/tests/] ( https://github.com/commercialhaskell/stack/tree/master/test/integration/tests )
293
- folder .
297
+ directory .
294
298
295
- You may also achieve this through GHCi with:
299
+ You may also achieve this through GHCi with tihs command :
296
300
297
- ``` bash
298
- $ stack ghci stack:stack-integration-test
301
+ ~~~ text
302
+ stack ghci stack:stack-integration-test
299
303
# GHCi starting up output ...
300
304
> :main -m "<PATTERN>"
301
- ```
305
+ ~~~
302
306
303
307
Where again, ` <PATTERN> ` is the name of the folder listed in the
304
308
[ test/integration/tests/] ( https://github.com/commercialhaskell/stack/tree/master/test/integration/tests )
305
- folder .
309
+ directory .
306
310
307
311
## Continuous integration (CI)
308
312
0 commit comments