3 . "$(dirname "$0")/testlib.sh"
9 # no need to setup a remote repo, since this test does not need to push or pull
15 git config lfs.extension.foo.clean "foo-clean %f"
16 git config lfs.extension.foo.smudge "foo-smudge %f"
17 git config lfs.extension.foo.priority 0
19 git config lfs.extension.bar.clean "bar-clean %f"
20 git config lfs.extension.bar.smudge "bar-smudge %f"
21 git config lfs.extension.bar.priority 1
23 git config lfs.extension.baz.clean "baz-clean %f"
24 git config lfs.extension.baz.smudge "baz-smudge %f"
25 git config lfs.extension.baz.priority 2
27 fooExpected="Extension: foo
29 smudge = foo-smudge %f
32 barExpected="Extension: bar
34 smudge = bar-smudge %f
37 bazExpected="Extension: baz
39 smudge = baz-smudge %f
42 actual=$(git lfs ext list foo)
43 [ "$actual" = "$fooExpected" ]
45 actual=$(git lfs ext list bar)
46 [ "$actual" = "$barExpected" ]
48 actual=$(git lfs ext list baz)
49 [ "$actual" = "$bazExpected" ]
51 actual=$(git lfs ext list foo bar)
52 expected=$(printf "%s\n%s" "$fooExpected" "$barExpected")
53 [ "$actual" = "$expected" ]
55 actual=$(git lfs ext list)
56 expected=$(printf "%s\n%s\n%s" "$fooExpected" "$barExpected" "$bazExpected")
57 [ "$actual" = "$expected" ]
60 [ "$actual" = "$expected" ]