t5583: fix shebang line
[alt-git.git] / t / t0070-fundamental.sh
blob574de3419800e5f392038de8f35374d355fc9bcf
1 #!/bin/sh
3 test_description='check that the most basic functions work
6 Verify wrappers and compatibility functions.
9 TEST_PASSES_SANITIZE_LEAK=true
10 . ./test-lib.sh
12 test_expect_success 'character classes (isspace, isalpha etc.)' '
13 test-tool ctype
16 test_expect_success 'mktemp to nonexistent directory prints filename' '
17 test_must_fail test-tool mktemp doesnotexist/testXXXXXX 2>err &&
18 grep "doesnotexist/test" err
21 test_expect_success POSIXPERM,SANITY 'mktemp to unwritable directory prints filename' '
22 mkdir cannotwrite &&
23 test_when_finished "chmod +w cannotwrite" &&
24 chmod -w cannotwrite &&
25 test_must_fail test-tool mktemp cannotwrite/testXXXXXX 2>err &&
26 grep "cannotwrite/test" err
29 test_expect_success 'git_mkstemps_mode does not fail if fd 0 is not open' '
30 git commit --allow-empty -m message <&-
33 test_expect_success 'check for a bug in the regex routines' '
34 # if this test fails, re-build git with NO_REGEX=1
35 test-tool regex --bug
38 test_expect_success 'incomplete sideband messages are reassembled' '
39 test-tool pkt-line send-split-sideband >split-sideband &&
40 test-tool pkt-line receive-sideband <split-sideband 2>err &&
41 grep "Hello, world" err
44 test_expect_success 'eof on sideband message is reported' '
45 printf 1234 >input &&
46 test-tool pkt-line receive-sideband <input 2>err &&
47 test_i18ngrep "unexpected disconnect" err
50 test_expect_success 'missing sideband designator is reported' '
51 printf 0004 >input &&
52 test-tool pkt-line receive-sideband <input 2>err &&
53 test_i18ngrep "missing sideband" err
56 test_done