File tree 3 files changed +32
-0
lines changed
gitbutler-testsupport/src
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -eu -o pipefail
3
+
4
+ git init simple
5
+ (cd simple
6
+ > file && git add file && git commit -m " init"
7
+ )
8
+
9
+ git clone simple submodule
10
+
11
+ git clone simple with-submodule
12
+ (cd with-submodule
13
+ git submodule add ../submodule
14
+ git commit -m " add submodule"
15
+ )
Original file line number Diff line number Diff line change @@ -24,6 +24,18 @@ mod add {
24
24
mod error {
25
25
use super :: * ;
26
26
27
+ #[ test]
28
+ fn submodule ( ) {
29
+ let ( controller, _tmp) = new ( ) ;
30
+ let root = gitbutler_testsupport:: gix_testtools:: scripted_fixture_read_only (
31
+ "various-repositories.sh" ,
32
+ )
33
+ . unwrap ( )
34
+ . join ( "with-submodule" ) ;
35
+ let err = controller. add ( root) . unwrap_err ( ) ;
36
+ assert_eq ! ( err. to_string( ) , "TBD" ) ;
37
+ }
38
+
27
39
#[ test]
28
40
fn missing ( ) {
29
41
let ( controller, _tmp) = new ( ) ;
Original file line number Diff line number Diff line change 1
1
#![ forbid( rust_2018_idioms) ]
2
2
pub const VAR_NO_CLEANUP : & str = "GITBUTLER_TESTS_NO_CLEANUP" ;
3
3
4
+ /// Direct access to lower-level utilities for cases where this is enough.
5
+ ///
6
+ /// Prefer to use [`read_only`] and [`writable`] otherwise.
7
+ pub use gix_testtools;
8
+
4
9
mod test_project;
5
10
pub use test_project:: TestProject ;
6
11
You can’t perform that action at this time.
0 commit comments