mirror of
https://github.com/majd/ipatool
synced 2026-11-26 17:27:52 +08:00
- Move logging to command level. - Simplify and unify interfaces for `appstore` package. - Move sinf replication from "Download" API to "ReplicateSinf" API. - Handle retries and command specific logic in the command level. - Rename "Info" API to "AccountInfo".
33 lines
717 B
Go
33 lines
717 B
Go
package util
|
|
|
|
import (
|
|
. "github.com/onsi/ginkgo/v2"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var _ = Describe("Zip", func() {
|
|
When("slices have different lengths", func() {
|
|
It("returns error", func() {
|
|
_, err := Zip([]string{}, []string{"test"})
|
|
Expect(err).To(HaveOccurred())
|
|
})
|
|
})
|
|
|
|
When("slices have different lengths", func() {
|
|
It("returns zipped slices", func() {
|
|
res, err := Zip([]string{
|
|
"lslice1",
|
|
"lslice2",
|
|
}, []string{
|
|
"rslice1",
|
|
"rslice2",
|
|
})
|
|
Expect(err).ToNot(HaveOccurred())
|
|
Expect(res[0].First).To(Equal("lslice1"))
|
|
Expect(res[0].Second).To(Equal("rslice1"))
|
|
Expect(res[1].First).To(Equal("lslice2"))
|
|
Expect(res[1].Second).To(Equal("rslice2"))
|
|
})
|
|
})
|
|
})
|