From 677202284a6742d68c05622161ad10689c4ff4a4 Mon Sep 17 00:00:00 2001 Message-Id: <677202284a6742d68c05622161ad10689c4ff4a4.1715197697.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 9 Oct 2007 06:34:24 +0200 Subject: [PATCH] New test: "stg diff" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware From: Karl Hasselström A simple test to make sure that we can run "stg diff" without arguments, just to list local changes. Note that two subtests currently fail; these are due to plain "stg diff" failing on a branch where "stg init" hasn't been run, which is plainly a bug. Signed-off-by: Karl Hasselström --- t/t2400-diff.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 t/t2400-diff.sh diff --git a/t/t2400-diff.sh b/t/t2400-diff.sh new file mode 100755 index 0000000..6d9ed98 --- /dev/null +++ b/t/t2400-diff.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +test_description='Run "stg diff"' + +. ./test-lib.sh + +test_expect_failure 'Diff with no StGit data' ' + stg diff +' + +test_expect_success 'Make some local changes' ' + echo foo >> foo.txt && + git add foo.txt +' + +test_expect_failure 'Diff with some local changes' ' + stg diff +' + +test_expect_success 'Initialize StGit stuff' ' + stg init && + stg new foo -m foo +' + +test_expect_success 'Diff with some local changes' ' + stg diff +' + +test_expect_success 'Refresh patch' ' + stg refresh +' + +test_expect_success 'Diff with no local changes' ' + stg diff +' + +test_done -- [mdw]