File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,23 @@ func TestEnvOptionParsing(t *testing.T) {
8686 require .Equal (t , o .BinaryPath , val )
8787 })
8888
89- t .Run ("git clone submodules" , func (t * testing.T ) {
89+ t .Run ("git clone submodules true " , func (t * testing.T ) {
9090 t .Setenv (options .WithEnvPrefix ("GIT_CLONE_SUBMODULES" ), "true" )
9191 o := runCLI ()
9292 require .Equal (t , 10 , o .GitCloneSubmodules ) // "true" defaults to depth 10
9393 })
94+
95+ t .Run ("git clone submodules depth" , func (t * testing.T ) {
96+ t .Setenv (options .WithEnvPrefix ("GIT_CLONE_SUBMODULES" ), "3" )
97+ o := runCLI ()
98+ require .Equal (t , 3 , o .GitCloneSubmodules )
99+ })
100+
101+ t .Run ("git clone submodules false" , func (t * testing.T ) {
102+ t .Setenv (options .WithEnvPrefix ("GIT_CLONE_SUBMODULES" ), "false" )
103+ o := runCLI ()
104+ require .Equal (t , 0 , o .GitCloneSubmodules )
105+ })
94106 })
95107}
96108
You can’t perform that action at this time.
0 commit comments