Lines Matching refs:line

722         _cleanup_free_ char *line = NULL;  in test_read_line_one_file()  local
724 assert_se(read_line(f, SIZE_MAX, &line) == 15 && streq(line, "Some test data")); in test_read_line_one_file()
725 line = mfree(line); in test_read_line_one_file()
727 assert_se(read_line(f, SIZE_MAX, &line) > 0 && streq(line, "루Non-ascii chars: ąę„”")); in test_read_line_one_file()
728 line = mfree(line); in test_read_line_one_file()
730 assert_se(read_line(f, SIZE_MAX, &line) == 13 && streq(line, "terminators")); in test_read_line_one_file()
731 line = mfree(line); in test_read_line_one_file()
733 assert_se(read_line(f, SIZE_MAX, &line) == 15 && streq(line, "and even more")); in test_read_line_one_file()
734 line = mfree(line); in test_read_line_one_file()
736 assert_se(read_line(f, SIZE_MAX, &line) == 25 && streq(line, "now the same with a NUL")); in test_read_line_one_file()
737 line = mfree(line); in test_read_line_one_file()
739 assert_se(read_line(f, SIZE_MAX, &line) == 10 && streq(line, "and more")); in test_read_line_one_file()
740 line = mfree(line); in test_read_line_one_file()
742 assert_se(read_line(f, SIZE_MAX, &line) == 16 && streq(line, "and even more")); in test_read_line_one_file()
743 line = mfree(line); in test_read_line_one_file()
745 assert_se(read_line(f, SIZE_MAX, &line) == 20 && streq(line, "and yet even more")); in test_read_line_one_file()
746 line = mfree(line); in test_read_line_one_file()
748 assert_se(read_line(f, 1024, &line) == 30 && streq(line, "With newlines, and a NUL byte")); in test_read_line_one_file()
749 line = mfree(line); in test_read_line_one_file()
751 assert_se(read_line(f, 1024, &line) == 1 && streq(line, "")); in test_read_line_one_file()
752 line = mfree(line); in test_read_line_one_file()
754 assert_se(read_line(f, 1024, &line) == 14 && streq(line, "an empty line")); in test_read_line_one_file()
755 line = mfree(line); in test_read_line_one_file()
759 assert_se(read_line(f, 16, &line) == -ENOBUFS); in test_read_line_one_file()
760 line = mfree(line); in test_read_line_one_file()
764 …assert_se(read_line(f, 1024, &line) == 62 && streq(line, "line that is supposed to be truncated, b… in test_read_line_one_file()
765 line = mfree(line); in test_read_line_one_file()
767 assert_se(read_line(f, 1024, &line) == 0 && streq(line, "")); in test_read_line_one_file()
794 _cleanup_free_ char *line = NULL; in TEST() local
802 r = read_line(f, LINE_MAX, &line); in TEST()
805 assert_se(line && isempty(line)); in TEST()
807 assert_se((size_t) r == strlen(line) + 1); in TEST()