summaryrefslogtreecommitdiffstatshomepage
path: root/tests/t0101-index.sh
blob: 445af6a6f0b48a3774c8778f4cbf12c73d88d00e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pr
#!/bin/sh

. ./setup.sh

prepare_tests "Check content on index page"

run_test 'generate index page' 'cgit_url "" >trash/tmp'
run_test 'find foo repo' 'grep -e "foo" trash/tmp'
run_test 'find foo description' 'grep -e "\[no description\]" trash/tmp'
run_test 'find bar repo' 'grep -e "bar" trash/tmp'
run_test 'find bar description' 'grep -e "the bar repo" trash/tmp'
run_test 'no tree-link' '! grep -e "foo/tree" trash/tmp'
run_test 'no log-link' '! grep -e "foo/log" trash/tmp'

tests_done
lloc) new_alloc = 8; new_data = realloc(vec->data, new_alloc * vec->size); if (!new_data) { if (gently) return ENOMEM; perror("vector.c:grow()"); exit(1); } vec->data = new_data; vec->alloc = new_alloc; return 0; } int vector_push(struct vector *vec, const void *data, int gently) { int rc; if (vec->count == vec->alloc && (rc = grow(vec, gently))) return rc; if (data) memmove(vec->data + vec->count * vec->size, data, vec->size); else memset(vec->data + vec->count * vec->size, 0, vec->size); vec->count++; return 0; }