Skip to content

Commit

Permalink
Don't try to open /dev/null input file...
Browse files Browse the repository at this point in the history
... it is not supported on Windows.
  • Loading branch information
godunko committed Jul 5, 2024
1 parent 3816654 commit 536a1c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion testsuite/json/test_json_decimal_to_number.adb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- Copyright (C) 2022, AdaCore
-- Copyright (C) 2022-2024, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
--
Expand Down Expand Up @@ -53,6 +53,13 @@ procedure Test_JSON_Decimal_To_Number is
Last : Natural;

begin
if File_Name = "/dev/null" then
-- There is no /dev/null file on Windows, so don't attempt to open it
-- to avoid unexpected test failure on Windows.

return;
end if;

Ada.Text_IO.Open (File, Ada.Text_IO.In_File, File_Name);

while not Ada.Text_IO.End_Of_File (File) loop
Expand Down

0 comments on commit 536a1c0

Please sign in to comment.