From 4fcc6ab64c96c587a69c692a2cc52c3727938993 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 20 Jul 2021 17:29:42 +0300 Subject: Remove redundant 'info:' prefix in cfg-create and cfg-link output --- bpkg/cfg-create.cxx | 10 +++++----- bpkg/cfg-link.cxx | 10 +++++----- tests/cfg-create.testscript | 40 ++++++++++++++++++------------------- tests/cfg-link.testscript | 48 ++++++++++++++++++++++----------------------- 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/bpkg/cfg-create.cxx b/bpkg/cfg-create.cxx index 1757e9c..61d1ef8 100644 --- a/bpkg/cfg-create.cxx +++ b/bpkg/cfg-create.cxx @@ -284,15 +284,15 @@ namespace bpkg diag_record dr (text); if (o.existing ()) - dr << "initialized existing configuration in " << c; + dr << "initialized existing configuration in " << c << '\n'; else - dr << "created new configuration in " << c; + dr << "created new configuration in " << c << '\n'; - dr << info << "uuid: " << cf->uuid - << info << "type: " << cf->type; + dr << " uuid: " << cf->uuid << '\n' + << " type: " << cf->type; if (cf->name) - dr << info << "name: " << *cf->name; + dr << "\n name: " << *cf->name; } return 0; diff --git a/bpkg/cfg-link.cxx b/bpkg/cfg-link.cxx index 2b3f52c..5cbeef7 100644 --- a/bpkg/cfg-link.cxx +++ b/bpkg/cfg-link.cxx @@ -302,14 +302,14 @@ namespace bpkg { diag_record dr (text); - dr << "linked configuration " << ld << - info << "uuid: " << lc->uuid << - info << "type: " << lc->type; + dr << "linked with configuration " << ld << '\n' + << " uuid: " << lc->uuid << '\n' + << " type: " << lc->type << '\n'; if (lc->name) - dr << info << "name: " << *lc->name; + dr << " name: " << *lc->name << '\n'; - dr << info << "id: " << *lc->id; + dr << " id: " << *lc->id; } return 0; diff --git a/tests/cfg-create.testscript b/tests/cfg-create.testscript index e518eea..46355e5 100644 --- a/tests/cfg-create.testscript +++ b/tests/cfg-create.testscript @@ -28,8 +28,8 @@ EOE { $* 2>>/~%EOE%; %created new configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: target + % uuid: .{36}% + type: target EOE $cfg_info >>/~"%EOO%"; @@ -47,8 +47,8 @@ EOE { $* "config.install.root='$~/opt'" 2>>/~%EOE%; %created new configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: target + % uuid: .{36}% + type: target EOE $cfg_info >>/~"%EOO%"; @@ -72,8 +72,8 @@ EOE { $* cxx $config_cxx 2>>/~%EOE%; %created new configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: target + % uuid: .{36}% + type: target EOE $cfg_info >>/~"%EOO%"; @@ -99,8 +99,8 @@ EOE $* --wipe 2>>/~%EOE%; %created new configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: target + % uuid: .{36}% + type: target EOE $cfg_info >>/~"%EOO%"; @@ -120,8 +120,8 @@ EOE $* --existing 2>>/~%EOE%; %initialized existing configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: target + % uuid: .{36}% + type: target EOE $cfg_info >>/~"%EOO%"; @@ -145,9 +145,9 @@ EOE { $* --name foo 2>>/~%EOE% &cfg/***; %created new configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: target - info: name: foo + % uuid: .{36}% + type: target + name: foo EOE $cfg_info >>/~"%EOO%"; @@ -179,8 +179,8 @@ EOE { $* --type host 2>>/~%EOE% &cfg/***; %created new configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: host + % uuid: .{36}% + type: host EOE $cfg_info >>/~"%EOO%"; @@ -214,9 +214,9 @@ EOE $* --config-uuid $uuid --name foo 2>>/~"%EOE%" &cfg/***; %created new configuration in .+/cfg/% - info: uuid: $uuid - info: type: target - info: name: foo + uuid: $uuid + type: target + name: foo EOE $cfg_info >>/~"%EOO%"; @@ -251,8 +251,8 @@ EOE $* --host-config host --build2-config build2 2>>/~%EOE% &cfg/***; %created new configuration in .+/cfg/% - % info: uuid: .{36}% - info: type: target + % uuid: .{36}% + type: target EOE $cfg_info >>/~"%EOO%"; diff --git a/tests/cfg-link.testscript b/tests/cfg-link.testscript index b396c1a..4eb0e59 100644 --- a/tests/cfg-link.testscript +++ b/tests/cfg-link.testscript @@ -37,11 +37,11 @@ acfg_uuid = '28f48b4b-b5d9-4712-b98c-1930df1c4228' # Link configuration. # $* acfg 2>>/~"%EOE%"; - %linked configuration .+/acfg/% - info: uuid: $acfg_uuid - info: type: target - info: name: shared - info: id: 1 + %linked with configuration .+/acfg/% + uuid: $acfg_uuid + type: target + name: shared + id: 1 EOE $pkg_status -d cfg libfoo >'libfoo unknown'; @@ -54,11 +54,11 @@ acfg_uuid = '28f48b4b-b5d9-4712-b98c-1930df1c4228' $* acfg 2>>/~"%EOE%"; %warning: current configuration .+/cfg/ is already implicitly linked with .+/acfg/% - %linked configuration .+/acfg/% - info: uuid: $acfg_uuid - info: type: target - info: name: shared - info: id: 1 + %linked with configuration .+/acfg/% + uuid: $acfg_uuid + type: target + name: shared + id: 1 EOE # Test that the repeated link is reported. @@ -88,10 +88,10 @@ acfg_uuid = '28f48b4b-b5d9-4712-b98c-1930df1c4228' $* acfg2 2>>/~%EOE%; warning: configuration with name shared is already linked as ../acfg/, linking as unnamed - %linked configuration .+/acfg2/% - % info: uuid: .{36}% - info: type: target - info: id: 2 + %linked with configuration .+/acfg2/% + % uuid: .{36}% + type: target + id: 2 EOE # Test that the integrity check fails. @@ -127,11 +127,11 @@ acfg_uuid = '28f48b4b-b5d9-4712-b98c-1930df1c4228' # Make the implicit link explicit. # $* -d acfg2 cfg 2>>/~"%EOE%"; - %linked configuration .+/cfg/% - info: uuid: $cfg_uuid - info: type: target - info: name: test - info: id: 1 + %linked with configuration .+/cfg/% + uuid: $cfg_uuid + type: target + name: test + id: 1 EOE $pkg_status -d cfg libfoo >'libfoo unknown'; @@ -167,11 +167,11 @@ acfg_uuid = '28f48b4b-b5d9-4712-b98c-1930df1c4228' $cfg_create -d cfg2 --name 'test' &cfg2/***; $* -d cfg2 acfg2 2>>/~%EOE%; - %linked configuration .+/acfg2/% - % info: uuid: .{36}% - info: type: target - info: name: shared - info: id: 1 + %linked with configuration .+/acfg2/% + % uuid: .{36}% + type: target + name: shared + id: 1 EOE # Test that the integrity check fails. -- cgit v1.1