perf: load test-lib-functions from the correct directory
[git.git] / t / perf / p0000-perf-lib-sanity.sh
blobf8dd53670950089c6e982110b42dd79115b54607
1 #!/bin/sh
3 test_description='Tests whether perf-lib facilities work'
4 . ./perf-lib.sh
6 test_perf_default_repo
8 test_perf 'test_perf_default_repo works' '
9 foo=$(git rev-parse HEAD) &&
10 test_export foo
13 test_checkout_worktree
15 test_perf 'test_checkout_worktree works' '
16 wt=$(find . | wc -l) &&
17 idx=$(git ls-files | wc -l) &&
18 test $wt -gt $idx
21 baz=baz
22 test_export baz
24 test_expect_success 'test_export works' '
25 echo "$foo" &&
26 test "$foo" = "$(git rev-parse HEAD)" &&
27 echo "$baz" &&
28 test "$baz" = baz
31 test_perf 'export a weird var' '
32 bar="weird # variable" &&
33 test_export bar
36 test_expect_success 'test_export works with weird vars' '
37 echo "$bar" &&
38 test "$bar" = "weird # variable"
41 test_perf 'test-lib-functions correctly loaded in subshells' '
42 : >a &&
43 test_path_is_file a
46 test_done