]> gitweb.factorcode.org Git - factor.git/blob - basis/logging/logging-tests.factor
Fixes #2966
[factor.git] / basis / logging / logging-tests.factor
1 USING: continuations io io.directories io.files.temp logging
2 logging.analysis logging.server math tools.test ;
3 IN: logging.tests
4
5 : input-logging-test ( a b -- c ) + ;
6
7 \ input-logging-test NOTICE add-input-logging
8
9 : output-logging-test ( a b -- c ) + ;
10
11 \ output-logging-test DEBUG add-output-logging
12
13 : error-logging-test ( a b -- c ) / ;
14
15 \ error-logging-test ERROR add-error-logging
16
17 temp-directory [
18     [ "logging-test" temp-file delete-tree ] ignore-errors
19
20     "logging-test" [
21         [ 4 ] [ 1 3 input-logging-test ] unit-test
22
23         [ 4 ] [ 1 3 output-logging-test ] unit-test
24
25         [ 4/3 ] [ 4 3 error-logging-test ] unit-test
26
27         [ f ] [ 1 0 error-logging-test ] unit-test
28     ] with-logging
29
30     [ ] [ "logging-test" { "input-logging-test" } analyze-log-file ] unit-test
31 ] with-log-root