ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gnat.dg/expect4.adb

35 lines
589 B
Ada
Raw Permalink Normal View History

2024-04-01 15:19:46 +00:00
-- { dg-do run }
with GNAT.Expect.TTY;
with GNAT.OS_Lib;
procedure Expect4 is
Pid : GNAT.Expect.TTY.TTY_Process_Descriptor;
Args : GNAT.OS_Lib.Argument_List (1 .. 0);
Result : GNAT.Expect.Expect_Match;
begin
Pid.Non_Blocking_Spawn ("true", Args);
begin
Pid.Expect (Result, ".*");
raise Program_Error;
exception
when GNAT.Expect.Process_Died =>
null;
end;
begin
Pid.Expect (Result, ".*");
raise Program_Error;
exception
when GNAT.Expect.Process_Died =>
null;
end;
Pid.Close;
end Expect4;