#include <stic.h>
#include <string.h> /* strdup() */
#include "../../src/ui/colored_line.h"
TEST(left_ellipsis_for_cline)
{
cline_t cline = {
.line = strdup("12345"),
.line_len = strlen(cline.line),
.attrs = strdup(""),
.attrs_len = strlen(cline.attrs),
};
cline_left_ellipsis(&cline, 2, "abc");
assert_string_equal("ab", cline.line);
assert_int_equal(strlen(cline.line), cline.line_len);
assert_string_equal(" ", cline.attrs);
assert_int_equal(strlen(cline.attrs), cline.attrs_len);
cline_dispose(&cline);
}
TEST(append_works)
{
cline_t left = {
.line = strdup("left"),
.line_len = strlen(left.line),
.attrs = strdup(""),
.attrs_len = strlen(left.attrs),
};
cline_t right = {
.line = strdup("right"),
.line_len = strlen(right.line),
.attrs = strdup(""),
.attrs_len = strlen(right.attrs),
};
cline_append(&left, &right);
assert_string_equal("leftright", left.line);
assert_int_equal(strlen(left.line), left.line_len);
assert_string_equal(" ", left.attrs);
assert_int_equal(strlen(left.attrs), left.attrs_len);
cline_dispose(&left);
}
/* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
/* vim: set cinoptions+=t0 : */
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/vifm
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm
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