@@ -782,6 +782,16 @@ test_submodule_forced_switch () {
782
782
783
783
test_submodule_switch_recursing () {
784
784
command=" $1 "
785
+ RESULTDS=success
786
+ if test " $KNOWN_FAILURE_DIRECTORY_SUBMODULE_CONFLICTS " = 1
787
+ then
788
+ RESULTDS=failure
789
+ fi
790
+ RESULTR=success
791
+ if test " $KNOWN_FAILURE_SUBMODULE_RECURSIVE_NESTED " = 1
792
+ then
793
+ RESULTR=failure
794
+ fi
785
795
# ######################## Appearing submodule #########################
786
796
# Switching to a commit letting a submodule appear checks it out ...
787
797
test_expect_success " $command : added submodule is checked out" '
@@ -891,7 +901,7 @@ test_submodule_switch_recursing () {
891
901
'
892
902
# Replacing a submodule with files in a directory must succeeds
893
903
# when the submodule is clean
894
- test_expect_success " $command : replace submodule with a directory" '
904
+ test_expect_ $RESULTDS " $command : replace submodule with a directory" '
895
905
prolog &&
896
906
reset_work_tree_to_interested add_sub1 &&
897
907
(
@@ -903,7 +913,7 @@ test_submodule_switch_recursing () {
903
913
)
904
914
'
905
915
# ... absorbing a .git directory.
906
- test_expect_success " $command : replace submodule containing a .git directory with a directory must absorb the git dir" '
916
+ test_expect_ $RESULTDS " $command : replace submodule containing a .git directory with a directory must absorb the git dir" '
907
917
prolog &&
908
918
reset_work_tree_to_interested add_sub1 &&
909
919
(
@@ -931,7 +941,7 @@ test_submodule_switch_recursing () {
931
941
'
932
942
933
943
# ... must check its local work tree for untracked files
934
- test_expect_success " $command : replace submodule with a file must fail with untracked files" '
944
+ test_expect_ $RESULTDS " $command : replace submodule with a file must fail with untracked files" '
935
945
prolog &&
936
946
reset_work_tree_to_interested add_sub1 &&
937
947
(
@@ -987,7 +997,8 @@ test_submodule_switch_recursing () {
987
997
)
988
998
'
989
999
990
- test_expect_success " $command : modified submodule updates submodule recursively" '
1000
+ # recursing deeper than one level doesn't work yet.
1001
+ test_expect_$RESULTR " $command : modified submodule updates submodule recursively" '
991
1002
prolog &&
992
1003
reset_work_tree_to_interested add_nested_sub &&
993
1004
(
@@ -1006,6 +1017,11 @@ test_submodule_switch_recursing () {
1006
1017
# the superproject as well as the submodule is allowed.
1007
1018
test_submodule_forced_switch_recursing () {
1008
1019
command=" $1 "
1020
+ RESULT=success
1021
+ if test " $KNOWN_FAILURE_DIRECTORY_SUBMODULE_CONFLICTS " = 1
1022
+ then
1023
+ RESULT=failure
1024
+ fi
1009
1025
# ######################## Appearing submodule #########################
1010
1026
# Switching to a commit letting a submodule appear creates empty dir ...
1011
1027
test_expect_success " $command : added submodule is checked out" '
@@ -1151,7 +1167,7 @@ test_submodule_forced_switch_recursing () {
1151
1167
'
1152
1168
1153
1169
# ... but stops for untracked files that would be lost
1154
- test_expect_success " $command : replace submodule with a file" '
1170
+ test_expect_ $RESULT " $command : replace submodule with a file stops for untracked files " '
1155
1171
prolog &&
1156
1172
reset_work_tree_to_interested add_sub1 &&
1157
1173
(
0 commit comments