From 168af6dc66793f670a24062443c59d620c053e28 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Sun, 2 Feb 2020 21:33:13 +0100 Subject: [PATCH] Add Test_Tool_Info_Error procedure and register it for execution to test the akt info command on invalid files --- regtests/keystore-tests.adb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/regtests/keystore-tests.adb b/regtests/keystore-tests.adb index 6b29c52..b8678f1 100644 --- a/regtests/keystore-tests.adb +++ b/regtests/keystore-tests.adb @@ -1,6 +1,6 @@ ----------------------------------------------------------------------- -- keystore-tests -- Tests for akt command --- Copyright (C) 2019 Stephane Carrez +-- Copyright (C) 2019, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); @@ -151,6 +151,8 @@ package body Keystore.Tests is Test_Tool_Extract_Error'Access); Caller.Add_Test (Suite, "Test AKT.Commands.Info", Test_Tool_Info'Access); + Caller.Add_Test (Suite, "Test AKT.Commands.Info (Error)", + Test_Tool_Info_Error'Access); Caller.Add_Test (Suite, "Test AKT.Commands.Create (Wallet_Key)", Test_Tool_With_Wallet_Key_File'Access); end Add_Tests; @@ -826,6 +828,13 @@ package body Keystore.Tests is end; end Test_Tool_Info; + procedure Test_Tool_Info_Error (T : in out Test) is + Result : Ada.Strings.Unbounded.Unbounded_String; + begin + T.Execute (Tool & " info Makefile", Result, 1); + T.Execute (Tool & " info some-missing-file", Result, 1); + end Test_Tool_Info_Error; + -- ------------------------------ -- Test the akt commands with --wallet-key-file -- ------------------------------