From 33518fc661b1e092e4f77456a89032b35097b759 Mon Sep 17 00:00:00 2001
From: Jerome Reybert <jreybert@gmail.com>
Date: Sat, 24 Oct 2015 09:54:19 +0200
Subject: [PATCH] test/addSubmodule: try to fix integration

---
 test/addSubmodule.vader                      | 8 ++++----
 test/addSubmodule/addSubmodule_diff.expect   | 9 ---------
 test/addSubmodule/addSubmodule_status.expect | 1 +
 test/setup.inc                               | 2 +-
 4 files changed, 6 insertions(+), 14 deletions(-)
 delete mode 100644 test/addSubmodule/addSubmodule_diff.expect
 create mode 100644 test/addSubmodule/addSubmodule_status.expect

diff --git a/test/addSubmodule.vader b/test/addSubmodule.vader
index 58450fc..3b52b06 100644
--- a/test/addSubmodule.vader
+++ b/test/addSubmodule.vader
@@ -8,8 +8,8 @@ Execute (Stage untracked directory closed):
     call Cursor_position()
     call magit#stage_file()
     call Cd_test()
-    let diff=Git_diff('staged')
-    call Expect_diff(g:test_script_dir . 'addSubmodule/addSubmodule_diff.expect', diff)
+    let diff=Git_status(Get_filename())
+    call Expect_diff(g:test_script_dir . 'addSubmodule/addSubmodule_status.expect', diff)
     call Git_cmd("git reset")
 
 Execute (Stage untracked directory opened):
@@ -21,8 +21,8 @@ Execute (Stage untracked directory opened):
     call Cursor_position()
     call magit#stage_file()
     call Cd_test()
-    let diff=Git_diff('staged')
-    call Expect_diff(g:test_script_dir . 'addSubmodule/addSubmodule_diff.expect', diff)
+    let diff=Git_status(Get_filename())
+    call Expect_diff(g:test_script_dir . 'addSubmodule/addSubmodule_status.expect', diff)
     call Git_cmd("git reset")
 
 Include: cleanup.inc
diff --git a/test/addSubmodule/addSubmodule_diff.expect b/test/addSubmodule/addSubmodule_diff.expect
deleted file mode 100644
index 1f38fa5..0000000
--- a/test/addSubmodule/addSubmodule_diff.expect
+++ /dev/null
@@ -1,9 +0,0 @@
-Submodule subdjooks a63bc77..6efcd49:
-  > books/models.py: first cover image support
-  > books/models.py: create Book entry with an isbn_search
-  > books/: add isbn_search module
-  > books/models.py: add BookManager
-  > migrations
-  > urls: add books urls in site urls
-  > views.py: fix typo
-  > urls: comment unsupported url
diff --git a/test/addSubmodule/addSubmodule_status.expect b/test/addSubmodule/addSubmodule_status.expect
new file mode 100644
index 0000000..99fc911
--- /dev/null
+++ b/test/addSubmodule/addSubmodule_status.expect
@@ -0,0 +1 @@
+M  subdjooks
diff --git a/test/setup.inc b/test/setup.inc
index 3b1816e..bb56adc 100644
--- a/test/setup.inc
+++ b/test/setup.inc
@@ -1,6 +1,6 @@
 Execute (setup):
   source $VIMAGIT_PATH/test/utils.vim
   call Cd_test()
-  call system("git reset --mixed " . $TEST_HEAD_SHA1 . "~1")
+  call system("git reset " . $TEST_HEAD_SHA1 . "~1")
   call Git_verbose_log(system("git status --porcelain"))
   call Cd_test_sub()
-- 
GitLab