From 30f6a563fc8c5b2d5c70cd55838aca4e5692b3e4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 9 Aug 2018 20:17:14 +0300 Subject: Fix init, config and status commands tests to pass for older git versions --- tests/config.test | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'tests/config.test') diff --git a/tests/config.test b/tests/config.test index 5beabcf..5e18427 100644 --- a/tests/config.test +++ b/tests/config.test @@ -5,10 +5,12 @@ # Note that we test the list sub-command while testing other sub-commands. # -.include common.test project.test +.include common.test git.test project.test cxx = cc "config.cxx=$config.cxx" +snapshot = ($git_supported ? '19700101000000' : 'z') + status += -d prj init += -d prj update += -d prj @@ -31,10 +33,10 @@ deinit += -d prj $init @cfg 2>>/~"%EOE%"; initializing in project $~/prj/ synchronizing: - % new prj.+19700101000000% + % new prj.+$snapshot% EOE - $status >'prj configured 0.1.0-a.0.19700101000000'; + $status >"prj configured 0.1.0-a.0.$snapshot"; $* list @cfg >>/"EOO"; @cfg $~/cfg-dir/ 1 default,forwarded,auto-synchronized @@ -65,10 +67,10 @@ deinit += -d prj $init @cfg 2>>/~"%EOE%"; initializing in project $~/prj/ synchronizing: - % new prj.+19700101000000% + % new prj.+$snapshot% EOE - $status >'prj configured 0.1.0-a.0.19700101000000'; + $status >"prj configured 0.1.0-a.0.$snapshot"; $* list >>/"EOO"; @cfg $~/prj-cfg/ 1 default,forwarded,auto-synchronized @@ -99,10 +101,10 @@ deinit += -d prj $init -c cfg 2>>/~"%EOE%"; initializing in project $~/prj/ synchronizing: - % new prj.+19700101000000% + % new prj.+$snapshot% EOE - $status >'prj configured 0.1.0-a.0.19700101000000'; + $status >"prj configured 0.1.0-a.0.$snapshot"; $* list >>/"EOO"; $~/cfg/ 1 default,forwarded,auto-synchronized @@ -162,19 +164,19 @@ deinit += -d prj initializing in project $~/prj/ in configuration @cfg1: synchronizing: - % new prj.+19700101000000% + % new prj.+$snapshot% in configuration @cfg2: synchronizing: - % new prj.+19700101000000% + % new prj.+$snapshot% EOE - $status --all >>EOO; + $status --all >>"EOO"; in configuration @cfg1: - prj configured 0.1.0-a.0.19700101000000 + prj configured 0.1.0-a.0.$snapshot in configuration @cfg2: - prj configured 0.1.0-a.0.19700101000000 + prj configured 0.1.0-a.0.$snapshot EOO $* list >>/"EOO"; @@ -218,7 +220,7 @@ deinit += -d prj $init @cfg 2>>/~"%EOE%"; initializing in project $~/prj/ synchronizing: - % new prj.+19700101000000% + % new prj.+$snapshot% EOE mv prj-cfg prj-cfg2; @@ -252,7 +254,7 @@ deinit += -d prj $init @cfg 2>>/~"%EOE%"; initializing in project $~/prj/ synchronizing: - % new prj.+19700101000000% + % new prj.+$snapshot% EOE $* rename @cfg cfg2 2>>/"EOE"; @@ -300,8 +302,8 @@ deinit += -d prj removed configuration @cfg1 $~/prj-cfg1/ 1 EOE - $status --all >>EOO; - prj configured 0.1.0-a.0.19700101000000 + $status --all >>"EOO"; + prj configured 0.1.0-a.0.$snapshot EOO $* list >>/"EOO"; -- cgit v1.1