From 536a1c0d4c0613f53c929bc2e19d91b2a056b53e Mon Sep 17 00:00:00 2001 From: Vadim Godunko Date: Fri, 5 Jul 2024 11:42:31 +0000 Subject: [PATCH] Don't try to open /dev/null input file... ... it is not supported on Windows. --- testsuite/json/test_json_decimal_to_number.adb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testsuite/json/test_json_decimal_to_number.adb b/testsuite/json/test_json_decimal_to_number.adb index 6d937f0c..32aa20b8 100644 --- a/testsuite/json/test_json_decimal_to_number.adb +++ b/testsuite/json/test_json_decimal_to_number.adb @@ -1,5 +1,5 @@ -- --- Copyright (C) 2022, AdaCore +-- Copyright (C) 2022-2024, AdaCore -- -- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -- @@ -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