@@ -3294,3 +3294,65 @@ func TestRebar3Path(t *testing.T) {
32943294 t .Errorf ("got %v, want %v" , cmd , expected )
32953295 }
32963296}
3297+
3298+ // --- vendor tests ---
3299+
3300+ func TestGomodVendor (t * testing.T ) {
3301+ tr := loadTranslator (t )
3302+ cmd , err := tr .BuildCommand ("gomod" , "vendor" , CommandInput {})
3303+ if err != nil {
3304+ t .Fatalf ("BuildCommand failed: %v" , err )
3305+ }
3306+ expected := []string {"go" , "mod" , "vendor" }
3307+ if ! reflect .DeepEqual (cmd , expected ) {
3308+ t .Errorf ("got %v, want %v" , cmd , expected )
3309+ }
3310+ }
3311+
3312+ func TestCargoVendor (t * testing.T ) {
3313+ tr := loadTranslator (t )
3314+ cmd , err := tr .BuildCommand ("cargo" , "vendor" , CommandInput {})
3315+ if err != nil {
3316+ t .Fatalf ("BuildCommand failed: %v" , err )
3317+ }
3318+ expected := []string {"cargo" , "vendor" }
3319+ if ! reflect .DeepEqual (cmd , expected ) {
3320+ t .Errorf ("got %v, want %v" , cmd , expected )
3321+ }
3322+ }
3323+
3324+ func TestBundlerVendor (t * testing.T ) {
3325+ tr := loadTranslator (t )
3326+ cmd , err := tr .BuildCommand ("bundler" , "vendor" , CommandInput {})
3327+ if err != nil {
3328+ t .Fatalf ("BuildCommand failed: %v" , err )
3329+ }
3330+ expected := []string {"bundle" , "cache" }
3331+ if ! reflect .DeepEqual (cmd , expected ) {
3332+ t .Errorf ("got %v, want %v" , cmd , expected )
3333+ }
3334+ }
3335+
3336+ func TestRebar3Vendor (t * testing.T ) {
3337+ tr := loadTranslator (t )
3338+ cmd , err := tr .BuildCommand ("rebar3" , "vendor" , CommandInput {})
3339+ if err != nil {
3340+ t .Fatalf ("BuildCommand failed: %v" , err )
3341+ }
3342+ expected := []string {"rebar3" , "vendor" }
3343+ if ! reflect .DeepEqual (cmd , expected ) {
3344+ t .Errorf ("got %v, want %v" , cmd , expected )
3345+ }
3346+ }
3347+
3348+ func TestPipVendor (t * testing.T ) {
3349+ tr := loadTranslator (t )
3350+ cmd , err := tr .BuildCommand ("pip" , "vendor" , CommandInput {})
3351+ if err != nil {
3352+ t .Fatalf ("BuildCommand failed: %v" , err )
3353+ }
3354+ expected := []string {"pip" , "download" , "-r" , "requirements.txt" , "-d" , "vendor" }
3355+ if ! reflect .DeepEqual (cmd , expected ) {
3356+ t .Errorf ("got %v, want %v" , cmd , expected )
3357+ }
3358+ }
0 commit comments