Debian Codegraph @

gcc/testsuite/gnat.dg/expect4.adb

raw
1 -- { dg-do run }
2
3 with GNAT.Expect.TTY;
4 with GNAT.OS_Lib;
5
6 procedure Expect4 is
7 Pid : GNAT.Expect.TTY.TTY_Process_Descriptor;
8 Args : GNAT.OS_Lib.Argument_List (1 .. 0);
9 Result : GNAT.Expect.Expect_Match;
10
11 begin
12 Pid.Non_Blocking_Spawn ("true", Args);
13
14 begin
15 Pid.Expect (Result, ".*");
16
17 raise Program_Error;
18
19 exception
20 when GNAT.Expect.Process_Died =>
21 null;
22 end;
23
24 begin
25 Pid.Expect (Result, ".*");
26
27 raise Program_Error;
28
29 exception
30 when GNAT.Expect.Process_Died =>
31 null;
32 end;
33
34 Pid.Close;
35 end Expect4;