xaizek / hstr (License: Apachev2) (since 2018-12-07)
Bash and Zsh shell history suggest box - easily view, navigate, search and manage your command history.
Commit 9e7499b95783e4ba52da14b028d0421d794d7c82

Adding test...
Author: Martin Dvorak
Author date (UTC): 2014-01-12 12:38
Committer name: Martin Dvorak
Committer date (UTC): 2014-01-12 12:38
Parent(s): a36d4ff8aee11b41b56d1c796fe519403f95f0c1
Signing key:
Tree: 32a765b7f5d012ee9e9b941777ec1703f29b3bfc
File Lines added Lines deleted
tests/test_hashset.c 24 0
tests/test_hashset.sh 1 0
File tests/test_hashset.c added (mode: 100644) (index 0000000..eade8b2)
1 /*
2 * test_hstr.c
3 *
4 * Created on: Jan 10, 2014
5 * Author: dvorka
6 */
7
8 #include "../src/include/hashset.h"
9
10 int main(int argc, char *argv[])
11 {
12 const char *commandBlacklist[] = {"ls", "pwd", "cd", "hh", "mc"};
13 HashSet blacklist;
14 int i;
15 hashset_init(&blacklist);
16 for(i=0; i<5; i++) {
17 hashset_add(&blacklist, commandBlacklist[i]);
18 }
19
20 for(i=0; i<5; i++) {
21 printf("match %d\n", hashset_contains(&blacklist, strdup(commandBlacklist[i])));
22 }
23 }
24
File tests/test_hashset.sh added (mode: 100755) (index 0000000..9059fe9)
1 gcc test_hashset.c ../src/hashset.c -o test_hashset
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/hstr

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/hstr

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master