File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5
5
6
6
## Unreleased
7
7
8
+ ### Fixed
9
+
10
+ - Fix ` Command::process_lines ` not working in sandboxed enviroments.
11
+
8
12
## [ 0.6.0] - 2020-04-01
9
13
10
14
### Added
Original file line number Diff line number Diff line change @@ -23,6 +23,32 @@ fn test_hello_world() {
23
23
} ) ;
24
24
}
25
25
26
+ #[ test]
27
+ fn test_process_lines ( ) {
28
+ runner:: run ( "hello-world" , |run| {
29
+ run. build ( SandboxBuilder :: new ( ) . enable_networking ( false ) , |build| {
30
+ let storage = rustwide:: logging:: LogStorage :: new ( LevelFilter :: Info ) ;
31
+ let mut ex = false ;
32
+ rustwide:: logging:: capture ( & storage, || -> Result < _ , Error > {
33
+ build
34
+ . cargo ( )
35
+ . process_lines ( & mut |line : & str | {
36
+ if line. contains ( "Hello, world!" ) {
37
+ ex = true ;
38
+ }
39
+ } )
40
+ . args ( & [ "run" ] )
41
+ . run ( ) ?;
42
+ Ok ( ( ) )
43
+ } ) ?;
44
+
45
+ assert ! ( ex) ;
46
+ Ok ( ( ) )
47
+ } ) ?;
48
+ Ok ( ( ) )
49
+ } ) ;
50
+ }
51
+
26
52
#[ test]
27
53
#[ cfg( not( windows) ) ]
28
54
fn test_sandbox_oom ( ) {
You can’t perform that action at this time.
0 commit comments