[PATCH 2/2] Test the 'stg rename' command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This just tests the few basic cases of the stg rename command.

Signed-off-by: Onno Kortmann <onno@xxxxxxx>
---

 t/t2900-rename.sh |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100755 t/t2900-rename.sh

diff --git a/t/t2900-rename.sh b/t/t2900-rename.sh
new file mode 100755
index 0000000..a8f8f0b
--- /dev/null
+++ b/t/t2900-rename.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright (c) 2008 Onno Kortmann
+# Parts taken from the other test scripts
+# in this directory.
+#
+
+test_description='stg rename test
+
+Tests some parts of the stg rename command.'
+
+. ./test-lib.sh
+stg init
+
+test_expect_success 'Rename in empty' '
+   ! stg rename foo
+'
+
+test_expect_success 'Rename single top-most' '
+   stg new -m foo
+   stg rename bar
+'
+# bar
+
+test_expect_success 'Rename non-existing' '
+   ! stg rename neithersuchpatch norsuchpatch
+'
+
+test_expect_success 'Rename with two arguments' '
+   stg new -m baz
+   stg rename bar foo
+'
+# foo,baz
+
+test_expect_success 'Rename to existing name' '
+   ! stg rename foo baz
+'
+
+test_expect_success 'Rename to same name' '
+   ! stg rename foo foo
+'
+
+test_expect_success 'Rename top-most when others exist' '
+   stg rename bar
+'
+
+test_done


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux