// When slashes are even, the object is valid and needs to be processed.
if (is_object) {
- if (++depth > positions_start.size) {
- status = f_array_lengths_increase(state.step_small, &positions_start);
+ if (++depth >= positions_start.size) {
+ status = f_array_lengths_resize(depth + 2, &positions_start);
if (F_status_is_error(status)) break;
- status = f_string_ranges_increase(state.step_small, &objects);
+ status = f_string_ranges_resize(depth + 2, &objects);
if (F_status_is_error(status)) break;
- status = f_array_lengths_increase(state.step_small, &slashes);
+ status = f_array_lengths_resize(depth + 2, &slashes);
if (F_status_is_error(status)) break;
}
if (positions_start.used < depth) {
+ objects.used = depth;
positions_start.used = depth;
slashes.used = depth;
}
- positions_start.array[depth] = newline_last + 1;
-
objects.array[depth].start = line_start;
objects.array[depth].stop = before_list_open;
-
+ positions_start.array[depth] = newline_last + 1;
slashes.array[depth] = 0;
}
}
}
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
- ++depth;
-
- if (depth >= positions_start.size) {
- status = f_array_lengths_increase(state.step_small, &positions_start);
+ if (++depth >= positions_start.size) {
+ status = f_array_lengths_resize(depth + 2, &positions_start);
if (F_status_is_error(status)) break;
- status = f_string_ranges_increase(state.step_small, &objects);
+ status = f_string_ranges_resize(depth + 2, &objects);
if (F_status_is_error(status)) break;
- status = f_array_lengths_increase(state.step_small, &slashes);
+ status = f_array_lengths_resize(depth + 2, &slashes);
if (F_status_is_error(status)) break;
}
if (positions_start.used <= depth) {
- positions_start.used = depth + 1;
- slashes.used = depth + 1;
+ objects.used = depth;
+ positions_start.used = depth;
+ slashes.used = depth;
}
- positions_start.array[depth] = range->start + 1;
-
objects.array[depth].start = line_start;
objects.array[depth].stop = before_list_open;
-
+ positions_start.array[depth] = range->start + 1;
slashes.array[depth] = 0;
if (graph_first == 0x2) {
found->depth[depth].array[position].object.stop = objects.array[depth].stop;
}
- found->depth[depth].array[position].content.array[0].start = positions_start.array[depth];
- found->depth[depth].array[position].content.array[0].stop = newline_last;
+ // The Content is empty when line_start is the same as the start position.
+ if (line_start == positions_start.array[depth]) {
+ found->depth[depth].array[position].content.array[0].start = 1;
+ found->depth[depth].array[position].content.array[0].stop = 0;
+ }
+ else {
+ found->depth[depth].array[position].content.array[0].start = positions_start.array[depth];
+ found->depth[depth].array[position].content.array[0].stop = newline_last;
+ }
+
found->depth[depth].array[position].content.used = 1;
if (position >= found->depth[depth].used) {
--- /dev/null
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+ a second "a".
--- /dev/null
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+ a second "a".
--- /dev/null
+ b c
+
+not:valid: list
+
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+ мир
+
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
--- /dev/null
+привет has space
--- /dev/null
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
--- /dev/null
+a:
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+a:
+ a second "a".
--- /dev/null
+a:
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+a:
+ a second "a".
--- /dev/null
+empty:
+d:
+ b c
+
+not:valid: list
+
+a:
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+привет:
+ мир
+
+y :
+ z
+"мир":
+ quoted, "yep".
+привет has space:
+ \"and so does this" "have space"
+"This is quoted":
+ But still a valid list.
+AlsoGood:
+hi :
+ Check this.
+привет has space :
+ ...
+a:
+ a second "a".
+also_empty:
--- /dev/null
+ The object name is an empty string.
--- /dev/null
+ The object name is an empty string.
+
+ Quotes aren't supported here, so this is not an empty object..
+\:
--- /dev/null
+a
+hi
+a
+a
+
+
+""
--- /dev/null
+ The object name is an empty string.
--- /dev/null
+a:
+a:
+a :
--- /dev/null
+a:
+a:
+a :
--- /dev/null
+a:
+hi:
+a:
+a :
+:
+ The object name is an empty string.
+
+:
+"":
+ Quotes aren't supported here, so this is not an empty object..
+\:
--- /dev/null
+a b привет
--- /dev/null
+привет мир a
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ with content.
+ another "A" list.
+ quoted, "yep".
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
--- /dev/null
+\# a valid list
--- /dev/null
+a
+\# a valid list
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
--- /dev/null
+a b привет
--- /dev/null
+\\# even this is not.
--- /dev/null
+привет мир a
--- /dev/null
+a:
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+a:
+ another "A" list.
--- /dev/null
+a:
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+a:
+ another "A" list.
--- /dev/null
+a:
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+\# a valid list:
+ with content.
+a:
+ another "A" list.
+"мир":
+ quoted, "yep".
+привет has space:
+ But this is not a comment.
+empty:
+hi:
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+has spaces :
+ yep.
+ fin
fss_basic_list_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_basic_list_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_basic_list_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_basic_list_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_basic_list_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_basic_list_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_basic_list_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_basic_list_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_basic_list_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_basic_list_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_basic_list_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_basic_list_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_basic_list_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_basic_list_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_basic_list_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_basic_list_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_basic_list_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_basic_list_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_basic_list_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_basic_list_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_basic_list_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_basic_list_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_basic_list_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_basic_list_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_basic_list_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_basic_list_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_basic_list_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_basic_list_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_basic_list_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_basic_list_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_basic_list_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_basic_list_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_basic_list_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_basic_list_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_basic_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_basic_list_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_basic_list_read +n -ont a ${file_source} > ${test_current}object-name-a-total.expect &&
fss_basic_list_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_basic_list_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_basic_list_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_basic_list_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_basic_list_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_basic_list_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_basic_list_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_basic_list_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
fss_basic_list_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_basic_list_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_basic_list_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_basic_list_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_basic_list_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_basic_list_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_basic_list_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_basic_list_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_basic_list_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_basic_list_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_basic_list_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_basic_list_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_basic_list_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_basic_list_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_basic_list_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_basic_list_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_basic_list_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_basic_list_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_basic_list_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_basic_list_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_basic_list_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_basic_list_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_basic_list_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_basic_list_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_basic_list_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_basic_list_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_basic_list_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_basic_list_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_basic_list_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_basic_list_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_basic_list_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_basic_list_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_basic_list_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_basic_list_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_basic_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_basic_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_basic_list_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_basic_list_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_basic_list_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_basic_list_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_basic_list_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_basic_list_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_basic_list_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_basic_list_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_basic_list_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
unset generate_cleanup
}
-generate_main $*
+generate_main "$@"
verify_main() {
local path_build="${1}"
local path_expect="${2}"
+ local test_name="${3}"
local failure=0
local basename_file=
local hash_build=
return 1
fi
+ if [[ $test_name != "" ]] ; then
+ test_name=" for ${test_name}"
+ fi
+
verify_operate_test_standard
if [[ ${failure} -eq 1 ]] ; then
}
verify_operate_test_standard() {
+ local -i fail=0
+ local -i success=0
+ local message=" (Did not run tests)"
+ local i=
for i in ${path_build}* ; do
if [[ $hash_build == $hash_expect ]] ; then
echo "[ Success ] ${basename_file}."
+
+ let success++
else
echo "[ Failure ] ${basename_file}."
let failure=1
+ let fail++
fi
done
+ if [[ $fail -gt 0 || $success -gt 0 ]] ; then
+ message=" (Success: $success, Fail: $fail)"
+ fi
+
echo
if [[ $failure -eq 1 ]] ; then
- echo "Failure! Some or all tests failed."
+ echo "Failure! Some or all tests failed${message}${test_name}."
else
- echo "Success! All tests passed."
+ echo "Success! All tests passed${message}${test_name}."
fi
return $failure
unset verify_cleanup
}
-verify_main $*
+verify_main "$@"
#ifndef _di_fss_basic_read_print_at_
void fss_basic_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_basic_read_data_t * const data) {
- if (at >= data->contents.used) {
- return;
+ if (at >= data->contents.used) return;
+
+ if (!(data->option & fss_basic_read_data_option_object_d)) {
+ if (!(data->option & fss_basic_read_data_option_content_d) || (!data->contents.array[at].used && !(data->option & fss_basic_read_data_option_empty_d))) {
+ return;
+ }
}
- if ((data->option & fss_basic_read_data_option_object_d) || (data->option & fss_basic_read_data_option_content_d) && (data->contents.array[at].used || (data->option & fss_basic_read_data_option_empty_d))) {
- flockfile(main->output.to.stream);
+ // 0x1 = object printed, 0x2 = content printed.
+ uint8_t print_state = 0x0;
+
+ flockfile(main->output.to.stream);
+
+ if (data->option & fss_basic_read_data_option_object_d) {
+ print_state = 0x1;
+
+ if (data->option & fss_basic_read_data_option_original_d) {
+ fss_basic_read_print_quote(main, data, data->quotes.array[at]);
- if (data->option & fss_basic_read_data_option_object_d) {
if (data->option & fss_basic_read_data_option_trim_d) {
- if (data->option & fss_basic_read_data_option_original_d) {
- if (data->quotes.array[at]) {
- f_print_dynamic_raw(
- data->quotes.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
-
- fl_print_trim_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream);
-
- if (data->quotes.array[at]) {
- f_print_dynamic_raw(
- data->quotes.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
- }
- else {
- fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
- }
+ fl_print_trim_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream);
}
else {
- if (data->option & fss_basic_read_data_option_original_d) {
- if (data->quotes.array[at]) {
- f_print_dynamic_raw(
- data->quotes.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
-
- f_print_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream);
-
- if (data->quotes.array[at]) {
- f_print_dynamic_raw(
- data->quotes.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
- }
- else {
- f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
- }
+ f_print_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream);
}
- if (data->option & fss_basic_read_data_option_content_d) {
- fss_basic_read_print_object_end(main);
+ fss_basic_read_print_quote(main, data, data->quotes.array[at]);
+ }
+ else {
+ if (data->option & fss_basic_read_data_option_trim_d) {
+ fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
+ }
+ else {
+ f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
}
+ }
+
+ if ((data->option & fss_basic_read_data_option_content_d)) {
+ if (data->contents.array[at].used) {
+ if (data->contents.array[at].array[0].start <= data->contents.array[at].array[0].stop) {
+ print_state |= 0x2;
+
+ if (data->option & fss_basic_read_data_option_object_d) {
+ fss_basic_read_print_object_end(main);
+ }
+ }
- if ((data->option & fss_basic_read_data_option_content_d) && data->contents.array[at].used) {
if (data->option & fss_basic_read_data_option_original_d) {
f_print_dynamic_partial(data->buffer, data->contents.array[at].array[0], main->output.to.stream);
}
f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[0], delimits_content, main->output.to.stream);
}
}
+ }
+ if (print_state & 0x3) {
fss_basic_read_print_set_end(main);
-
- funlockfile(main->output.to.stream);
}
+ else if (data->option & fss_basic_read_data_option_content_d) {
+ fss_basic_read_print_content_end_empty(main);
+ }
+
+ funlockfile(main->output.to.stream);
}
#endif // _di_fss_basic_read_print_at_
+#ifndef _di_fss_basic_read_print_content_end_empty_
+ void fss_basic_read_print_content_end_empty(fll_program_data_t * const main) {
+
+ if (main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
+ f_print_dynamic_raw(fss_basic_read_pipe_content_end_s, main->output.to.stream);
+ }
+ }
+#endif // _di_fss_basic_read_print_content_end_empty_
+
#ifndef _di_fss_basic_read_print_object_end_
void fss_basic_read_print_object_end(fll_program_data_t * const main) {
}
#endif // _di_fss_basic_read_print_one_
+#ifndef _di_fss_basic_read_print_quote_
+ uint8_t fss_basic_read_print_quote(fll_program_data_t * const main, fss_basic_read_data_t * const data, const f_fss_quote_t quote) {
+
+ if (!(data->option & fss_basic_read_data_option_original_d) || !quote) return F_false;
+
+ f_print_dynamic_raw(
+ quote == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : quote == f_fss_quote_type_double_e
+ ? f_fss_quote_double_s
+ : f_fss_quote_backtick_s,
+ main->output.to.stream
+ );
+
+ return F_true;
+ }
+#endif // _di_fss_basic_read_print_quote_
+
#ifndef _di_fss_basic_read_print_set_end_
void fss_basic_read_print_set_end(fll_program_data_t * const main) {
#endif // _di_fss_basic_read_print_at_
/**
+ * Print the "empty" Content.
+ *
+ * This only prints the end Content start pipe character.
+ * This does not print the Content end pipe character to avoid conflicting with the calls to the set end function.
+ *
+ * This does not print the Content set end.
+ */
+#ifndef _di_fss_basic_read_print_content_end_empty_
+ extern void fss_basic_read_print_content_end_empty(fll_program_data_t * const main) F_attribute_visibility_internal_d;
+#endif // _di_fss_basic_read_print_content_end_empty_
+
+/**
* Print the end of an Object (which is essentially the start of Content).
*
* @param main
#endif // _di_fss_basic_read_print_one_
/**
+ * Print the quote surrounding an Object or Content.
+ *
+ * This only prints if there is a quote and the original flag is set.
+ *
+ * @param main
+ * The main program data.
+ * @param data
+ * The program data.
+ * @param quote
+ * The quote character.
+ *
+ * @return
+ * F_true on quote printed.
+ * F_false otherwise.
+ */
+#ifndef _di_fss_basic_read_print_quote_
+ extern uint8_t fss_basic_read_print_quote(fll_program_data_t * const main, fss_basic_read_data_t * const data, const f_fss_quote_t quote);
+#endif // _di_fss_basic_read_print_quote_
+
+/**
* Print the end of an Object/Content set.
*
* @param main
--- /dev/null
+"line...with some" random text
+nother line.
+b 'c d' \'e f' \\'g
--- /dev/null
+"line...with some" random text
+nother line.
+b 'c d' \'e f' \\'g
--- /dev/null
+there.
+there
+to you."
+and so on..
+zero
+a b
+one
+c d
+e f
+there
+bb
+bb
+another zero
+a "comment...should have" no slashes.
+a comment either...should 'have one' slash.
+a `comment either...should` \'have two' \\'slashes'.
+"line...with some" random text
+nother line.
+b 'c d' \'e f' \\'g
+quoted, "yep".
+\"and so does this" "have space"
--- /dev/null
+hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
--- /dev/null
+\\hi there
--- /dev/null
+a "line...with some" random text
+a nother line.
+a b 'c d' \'e f' \\'g
--- /dev/null
+a "line...with some" random text
+a nother line.
+a b 'c d' \'e f' \\'g
--- /dev/null
+hi there.
+\\hi there
+\\\\\\"Hello to you."
+"\\\\\" quoted stuff." and so on..
+"" zero
+\"" a b
+\" one
+"""" c d
+"\" " e f
+"\\\\\" sss" there
+"\\"\\\" xx" bb
+"\\"\\\"" bb
+"" another zero
+\#not a "comment...should have" no slashes.
+\\#not a comment either...should 'have one' slash.
+\\\#not a `comment either...should` \'have two' \\'slashes'.
+a "line...with some" random text
+a nother line.
+a b 'c d' \'e f' \\'g
+"мир" quoted, "yep".
+"привет has space" \"and so does this" "have space"
--- /dev/null
+d zerowidth
--- /dev/null
+space! <-- should have the word 'space!'
--- /dev/null
+line܀܀܀with some random text
--- /dev/null
+b k d3a
+line܀܀܀with some random text
+偐 ぐ
+b c d e f ሴ䌡
--- /dev/null
+b k d3a
+line܀܀܀with some random text
+偐 ぐ
+b c d e f ሴ䌡
--- /dev/null
+b k d3a
+d zerowidth
+мир h d3b d4b т
+e␠
+out
+space! <-- should have the word 'space!'
+line܀܀܀with some random text
+偐 ぐ
+b c d e f ሴ䌡
+"and so does this" "ሴ 䌡"
--- /dev/null
+a
+a
+a
+a
--- /dev/null
+a
+a
+a
+a
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+"привет has space"
--- /dev/null
+c d zerowidth
--- /dev/null
+UTF space! <-- should have the word 'space!'
--- /dev/null
+a b k d3a
+a line܀܀܀with some random text
+a 偐 ぐ
+a b c d e f ሴ䌡
--- /dev/null
+a b k d3a
+a line܀܀܀with some random text
+a 偐 ぐ
+a b c d e f ሴ䌡
мир e␠
spaced out
UTF space! <-- should have the word 'space!'
-hi
+hi
a line܀܀܀with some random text
a 偐 ぐ
a b c d e f ሴ䌡
--- /dev/null
+a b k d3a
+c d zerowidth
+привет мир h d3b d4b т
+мир e␠
+spaced out
+UTF space! <-- should have the word 'space!'
+hi
+a line܀܀܀with some random text
+a 偐 ぐ
+a b c d e f ሴ䌡
+"привет has space" "and so does this" "ሴ 䌡"
мир e␠
spaced out
UTF space! <-- should have the word 'space!'
-hi
+hi
a line܀܀܀with some random text
a 偐 ぐ
a b c d e f ሴ䌡
мир e␠
spaced out
UTF space! <-- should have the word 'space!'
-hi
+hi
a line܀܀܀with some random text
a 偐 ぐ
a b c d e f ሴ䌡
мир e␠
spaced out
UTF space! <-- should have the word 'space!'
-hi
+hi
a line܀܀܀with some random text
a 偐 ぐ
a b c d e f ሴ䌡
fss_basic_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_basic_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_basic_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_basic_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_basic_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_basic_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_basic_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_basic_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_basic_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_basic_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_basic_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_basic_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_basic_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_basic_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_basic_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_basic_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_basic_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_basic_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_basic_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_basic_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_basic_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_basic_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_basic_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_basic_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_basic_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_basic_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_basic_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_basic_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_basic_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_basic_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_basic_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_basic_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_basic_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_basic_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_basic_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_basic_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_basic_read +n -ont a ${file_source} > ${test_current}object-name-a-total.expect &&
fss_basic_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_basic_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_basic_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_basic_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_basic_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_basic_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_basic_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_basic_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
fss_basic_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_basic_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_basic_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_basic_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_basic_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_basic_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_basic_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_basic_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_basic_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_basic_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_basic_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_basic_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_basic_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_basic_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_basic_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_basic_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_basic_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_basic_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_basic_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_basic_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_basic_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_basic_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_basic_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_basic_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_basic_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_basic_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_basic_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_basic_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_basic_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_basic_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_basic_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_basic_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_basic_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_basic_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_basic_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_basic_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_basic_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_basic_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_basic_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_basic_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_basic_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_basic_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_basic_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_basic_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_basic_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
unset generate_cleanup
}
-generate_main $*
+generate_main "$@"
verify_main() {
local path_build="${1}"
local path_expect="${2}"
+ local test_name="${3}"
local failure=0
local basename_file=
local hash_build=
return 1
fi
+ if [[ $test_name != "" ]] ; then
+ test_name=" for ${test_name}"
+ fi
+
verify_operate_test_standard
if [[ ${failure} -eq 1 ]] ; then
}
verify_operate_test_standard() {
+ local -i fail=0
+ local -i success=0
+ local message=" (Did not run tests)"
+ local i=
for i in ${path_build}* ; do
if [[ $hash_build == $hash_expect ]] ; then
echo "[ Success ] ${basename_file}."
+
+ let success++
else
echo "[ Failure ] ${basename_file}."
let failure=1
+ let fail++
fi
done
+ if [[ $fail -gt 0 || $success -gt 0 ]] ; then
+ message=" (Success: $success, Fail: $fail)"
+ fi
+
echo
if [[ $failure -eq 1 ]] ; then
- echo "Failure! Some or all tests failed."
+ echo "Failure! Some or all tests failed${message}${test_name}."
else
- echo "Success! All tests passed."
+ echo "Success! All tests passed${message}${test_name}."
fi
return $failure
unset verify_cleanup
}
-verify_main $*
+verify_main "$@"
status = F_status_set_error(F_parameter);
}
- if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
#ifndef _di_fss_embedded_list_read_main_process_for_depth_
f_status_t fss_embedded_list_read_main_process_for_depth(fss_embedded_list_read_data_t * const data, const f_string_static_t filename, const fss_embedded_list_read_depths_t depths, const f_array_length_t depths_index, const f_array_length_t line, const fss_embedded_list_read_skip_t parents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) {
- f_fss_items_t *items = &data->nest.depth[depths.array[depths_index].depth];
+ f_fss_items_t * const items = (f_fss_items_t *) &data->nest.depth[depths.array[depths_index].depth];
bool skip[items->used];
// Setup defaults to be not skipped unless any given parent is skipped.
- memset(skip, F_false, sizeof(skip) * items->used);
+ memset(skip, F_false, sizeof(bool) * items->used);
if (parents.used) {
for (f_array_length_t i = 0; i < items->used; ++i) {
+ \"and so does this" "have space"
-0
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
-0
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
--- /dev/null
+ quoted, "yep".
--- /dev/null
+ \"and so does this" "have space"
+ \"and so does this" "have space"
-0
+ e f
+ g h
+ a second "a".
-0
+ e f
+ g h
+ a second "a".
--- /dev/null
+ e f
+ g h
+ a second "a".
--- /dev/null
+ e f
+ g h
+ a second "a".
+ e f
+ g h
+ a second "a".
+ e f
+ g h
+ a second "a".
+ \"and so does this" "have space"
+ \"and so does this" "have space"
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
--- /dev/null
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
-0
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
-0
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
-0
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
-0
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
-0
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
--- /dev/null
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
--- /dev/null
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y{
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi{
+ Check this.
+}
+привет has space{
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
+ Quotes aren't supported here, so this is not an empty object..
+}
-0
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+}
-0
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+}
--- /dev/null
+ The object name is an empty string.
+ The object name is an empty string.
--- /dev/null
+ Quotes aren't supported here, so this is not an empty object..
+ Quotes aren't supported here, so this is not an empty object..
+ The object name is an empty string.
+ The object name is an empty string.
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+\}
--- /dev/null
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+\}
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+}
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+}
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
-0
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
-0
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+{
+ The object name is an empty string.
+}
+{
+}
+{
+ The object name is an empty string.
+}
+{
+}
--- /dev/null
+a{
+}
+a{
+}
--- /dev/null
+a{
+}
+a{
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+\}
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a{
+}
+hi{
+}
+a{
+}
+a{
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+}
+}
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
-0
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ # has a comment
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
-0
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ # has a comment
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
--- /dev/null
+a b привет
--- /dev/null
+привет мир a
-0
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
-0
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+ another "A" list.
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ # has a comment
+ But this is not a comment.
+ # has a comment
+ But this is not a comment.
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ # has a comment
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ # has a comment
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ # has a comment
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ # has a comment
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ # has a comment
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
-0
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
-0
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
-0
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
-0
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
-0
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
--- /dev/null
+a{
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
--- /dev/null
+a{
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+a{
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces{
+ yep.
+ fin
+}
+a{
+a b привет
+c d
+ # not a comment
+ \\# nor is this.
+\# even this is not.
+привет мир a
+
+ # a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ # has a comment
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
fss_embedded_list_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_embedded_list_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_embedded_list_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_embedded_list_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_embedded_list_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_embedded_list_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_embedded_list_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_embedded_list_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_embedded_list_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_embedded_list_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_embedded_list_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_embedded_list_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_embedded_list_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_embedded_list_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_embedded_list_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_embedded_list_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_embedded_list_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_embedded_list_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_embedded_list_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_embedded_list_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_embedded_list_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_embedded_list_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_embedded_list_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_embedded_list_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_embedded_list_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_embedded_list_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_embedded_list_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_embedded_list_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_embedded_list_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_embedded_list_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_embedded_list_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_embedded_list_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_embedded_list_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_embedded_list_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_embedded_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_embedded_list_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_embedded_list_read +n -ont a ${file_source} > ${test_current}object-name-a-total.expect &&
fss_embedded_list_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_embedded_list_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_embedded_list_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_embedded_list_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_embedded_list_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_embedded_list_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_embedded_list_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_embedded_list_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
fss_embedded_list_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_embedded_list_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_embedded_list_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_embedded_list_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_embedded_list_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_embedded_list_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_embedded_list_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_embedded_list_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_embedded_list_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_embedded_list_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_embedded_list_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_embedded_list_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_embedded_list_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_embedded_list_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_embedded_list_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_embedded_list_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_embedded_list_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_embedded_list_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_embedded_list_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_embedded_list_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_embedded_list_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_embedded_list_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_embedded_list_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_embedded_list_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_embedded_list_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_embedded_list_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_embedded_list_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_embedded_list_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_embedded_list_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_embedded_list_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_embedded_list_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_embedded_list_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_embedded_list_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_embedded_list_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_embedded_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_embedded_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_embedded_list_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_embedded_list_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_embedded_list_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_embedded_list_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_embedded_list_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_embedded_list_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_embedded_list_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_embedded_list_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_embedded_list_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
unset generate_cleanup
}
-generate_main $*
+generate_main "$@"
verify_main() {
local path_build="${1}"
local path_expect="${2}"
+ local test_name="${3}"
local failure=0
local basename_file=
local hash_build=
return 1
fi
+ if [[ $test_name != "" ]] ; then
+ test_name=" for ${test_name}"
+ fi
+
verify_operate_test_standard
if [[ ${failure} -eq 1 ]] ; then
}
verify_operate_test_standard() {
+ local -i fail=0
+ local -i success=0
+ local message=" (Did not run tests)"
+ local i=
for i in ${path_build}* ; do
if [[ $hash_build == $hash_expect ]] ; then
echo "[ Success ] ${basename_file}."
+
+ let success++
else
echo "[ Failure ] ${basename_file}."
let failure=1
+ let fail++
fi
done
+ if [[ $fail -gt 0 || $success -gt 0 ]] ; then
+ message=" (Success: $success, Fail: $fail)"
+ fi
+
echo
if [[ $failure -eq 1 ]] ; then
- echo "Failure! Some or all tests failed."
+ echo "Failure! Some or all tests failed${message}${test_name}."
else
- echo "Success! All tests passed."
+ echo "Success! All tests passed${message}${test_name}."
fi
return $failure
unset verify_cleanup
}
-verify_main $*
+verify_main "$@"
return F_none;
}
+ f_array_length_t at = 0;
f_array_length_t max = 0;
- for (f_array_length_t at = 0; at < data->contents.used; ++at) {
+ // Extended List only supports a single Content and so index 0 can be assumed.
+ for (; at < data->contents.used; ++at) {
- if (!names[at]) continue;
+ if (!names[at] || !data->contents.array[at].used) continue;
- if (data->contents.array[at].used > max) {
- max = data->contents.array[at].used;
+ if ((data->option & fss_extended_list_read_data_option_empty_d) || data->contents.array[at].array[0].start <= data->contents.array[at].array[0].stop) {
+ max = 1;
+
+ break;
}
} // for
--- /dev/null
+ quoted, "yep".
--- /dev/null
+ \"and so does this" "have space"
--- /dev/null
+ e f
+ g h
+ a second "a".
--- /dev/null
+ e f
+ g h
+ a second "a".
--- /dev/null
+ b c
+ e f
+ g h
+ мир
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
--- /dev/null
+привет has space
--- /dev/null
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
--- /dev/null
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
--- /dev/null
+a{
+ e f
+ g h
+}
+a{
+ a second "a".
+}
--- /dev/null
+empty{
+}
+d{
+ b c
+}
+a{
+ e f
+ g h
+}
+привет{
+ мир
+}
+y {
+ z
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ \"and so does this" "have space"
+}
+"This is quoted"{
+ But still a valid list.
+}
+AlsoGood{
+}
+hi {
+ Check this.
+}
+привет has space {
+ ...
+}
+a{
+ a second "a".
+}
+also_empty{
+}
--- /dev/null
+ The object name is an empty string.
--- /dev/null
+ Quotes aren't supported here, so this is not an empty object..
--- /dev/null
+ The object name is an empty string.
+ Quotes aren't supported here, so this is not an empty object..
+\}
--- /dev/null
+a
+hi
+a
+a
+
+
+""
--- /dev/null
+a{
+}
+a{
+}
+a {
+}
--- /dev/null
+a{
+}
+a{
+}
+a {
+}
--- /dev/null
+a{
+}
+hi{
+}
+a{
+}
+a {
+}
+{
+ The object name is an empty string.
+}
+{
+}
+""{
+ Quotes aren't supported here, so this is not an empty object..
+\}
+}
--- /dev/null
+a b привет
--- /dev/null
+привет мир a
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+ another "A" list.
+ quoted, "yep".
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
--- /dev/null
+has spaces
--- /dev/null
+a
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
--- /dev/null
+a b привет
--- /dev/null
+\\# even this is not.
--- /dev/null
+привет мир a
--- /dev/null
+a{
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
--- /dev/null
+a{
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
--- /dev/null
+a{
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ \# a valid list:
+ with content.
+}
+a{
+ another "A" list.
+}
+"мир"{
+ quoted, "yep".
+}
+привет has space{
+ But this is not a comment.
+}
+empty{
+}
+hi{
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+}
+has spaces {
+ yep.
+ fin
+}
fss_extended_list_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_extended_list_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_extended_list_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_extended_list_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_extended_list_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_extended_list_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_extended_list_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_extended_list_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_extended_list_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_extended_list_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_extended_list_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_extended_list_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
+ fss_extended_list_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_extended_list_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_extended_list_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_extended_list_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_extended_list_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_extended_list_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
fss_extended_list_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_extended_list_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_extended_list_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_extended_list_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_extended_list_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_extended_list_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_extended_list_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_extended_list_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_extended_list_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_extended_list_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_extended_list_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_extended_list_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_extended_list_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_extended_list_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_extended_list_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_extended_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_extended_list_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_extended_list_read +n -ont a ${file_source} > ${test_current}object-name-a-total.expect &&
fss_extended_list_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_extended_list_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_extended_list_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_extended_list_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_extended_list_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_extended_list_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_extended_list_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_extended_list_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
fss_extended_list_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_extended_list_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_extended_list_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_extended_list_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_extended_list_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_extended_list_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_extended_list_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_extended_list_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_extended_list_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_extended_list_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_extended_list_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_extended_list_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_extended_list_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_extended_list_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_extended_list_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_extended_list_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_extended_list_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_extended_list_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_extended_list_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_extended_list_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_extended_list_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_extended_list_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_extended_list_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_extended_list_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_extended_list_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_extended_list_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_extended_list_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_extended_list_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_extended_list_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_extended_list_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_extended_list_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_extended_list_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_extended_list_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_extended_list_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_extended_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_extended_list_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_extended_list_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_extended_list_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_extended_list_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_extended_list_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_extended_list_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_extended_list_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_extended_list_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_extended_list_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_extended_list_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
unset generate_cleanup
}
-generate_main $*
+generate_main "$@"
verify_main() {
local path_build="${1}"
local path_expect="${2}"
+ local test_name="${3}"
local failure=0
local basename_file=
local hash_build=
return 1
fi
+ if [[ $test_name != "" ]] ; then
+ test_name=" for ${test_name}"
+ fi
+
verify_operate_test_standard
if [[ ${failure} -eq 1 ]] ; then
}
verify_operate_test_standard() {
+ local -i fail=0
+ local -i success=0
+ local message=" (Did not run tests)"
+ local i=
for i in ${path_build}* ; do
if [[ $hash_build == $hash_expect ]] ; then
echo "[ Success ] ${basename_file}."
+
+ let success++
else
echo "[ Failure ] ${basename_file}."
let failure=1
+ let fail++
fi
done
+ if [[ $fail -gt 0 || $success -gt 0 ]] ; then
+ message=" (Success: $success, Fail: $fail)"
+ fi
+
echo
if [[ $failure -eq 1 ]] ; then
- echo "Failure! Some or all tests failed."
+ echo "Failure! Some or all tests failed${message}${test_name}."
else
- echo "Success! All tests passed."
+ echo "Success! All tests passed${message}${test_name}."
fi
return $failure
unset verify_cleanup
}
-verify_main $*
+verify_main "$@"
#ifndef _di_fss_extended_read_print_at_
void fss_extended_read_print_at(fll_program_data_t * const main, const f_array_length_t at, const f_fss_delimits_t delimits_object, const f_fss_delimits_t delimits_content, fss_extended_read_data_t * const data) {
- if (at >= data->contents.used) {
- return;
+ if (at >= data->contents.used) return;
+
+ if (!(data->option & fss_extended_read_data_option_object_d)) {
+ if (!(data->option & fss_extended_read_data_option_content_d) || (!data->contents.array[at].used && !(data->option & fss_extended_read_data_option_empty_d))) {
+ return;
+ }
}
- flockfile(main->output.to.stream);
+ // 0x1 = object printed, 0x2 = content printed, 0x4 = object end printed, 0x8 = previous content printed.
+ uint8_t print_state = 0x0;
- if ((data->option & fss_extended_read_data_option_object_d) || (data->option & fss_extended_read_data_option_content_d) && (data->contents.array[at].used || (data->option & fss_extended_read_data_option_empty_d))) {
- if (data->option & fss_extended_read_data_option_object_d) {
- if (data->option & fss_extended_read_data_option_trim_d) {
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(
- data->quotes_object.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_object.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
+ flockfile(main->output.to.stream);
- fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
-
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(
- data->quotes_object.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_object.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
- }
- else {
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(
- data->quotes_object.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_object.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
+ if (data->option & fss_extended_read_data_option_object_d) {
+ print_state = 0x1;
- f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
-
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(
- data->quotes_object.array[at] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_object.array[at] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
- }
+ fss_extended_read_print_quote(main, data, data->quotes_object.array[at]);
- if (data->option & fss_extended_read_data_option_content_d) {
- fss_extended_read_print_object_end(main);
- }
+ if (data->option & fss_extended_read_data_option_trim_d) {
+ fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
+ else {
+ f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
+ }
+
+ fss_extended_read_print_quote(main, data, data->quotes_object.array[at]);
+ }
- bool content_printed = F_false;
-
- if ((data->option & fss_extended_read_data_option_content_d) && data->contents.array[at].used) {
- if (data->option & fss_extended_read_data_option_select_d) {
- if (data->select < data->contents.array[at].used) {
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[data->select]) {
- content_printed = F_true;
-
- f_print_dynamic_raw(
- data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_content.array[at].array[data->select] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
+ if ((data->option & fss_extended_read_data_option_content_d) && data->contents.array[at].used) {
+ if (data->option & fss_extended_read_data_option_select_d) {
+ if (data->select < data->contents.array[at].used) {
+ if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[data->select] || data->contents.array[at].array[data->select].start <= data->contents.array[at].array[data->select].stop) {
+ if ((print_state & 0x1) && !(print_state & 0x4)) {
+ print_state |= 0x6;
+
+ fss_extended_read_print_object_end(main);
+ }
+ else {
+ print_state |= 0x2;
}
- if (data->contents.array[at].array[data->select].start <= data->contents.array[at].array[data->select].stop) {
- content_printed = F_true;
+ fss_extended_read_print_quote(main, data, data->quotes_content.array[at].array[data->select]);
+ if (data->contents.array[at].array[data->select].start <= data->contents.array[at].array[data->select].stop) {
f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[data->select], delimits_content, main->output.to.stream);
}
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[data->select]) {
- content_printed = F_true;
-
- f_print_dynamic_raw(
- data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_content.array[at].array[data->select] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
+ fss_extended_read_print_quote(main, data, data->quotes_content.array[at].array[data->select]);
}
}
- else {
- for (f_array_length_t i = 0; i < data->contents.array[at].used; ++i) {
+ }
+ else {
+ for (f_array_length_t i = 0; i < data->contents.array[at].used; ++i) {
- if (data->contents.array[at].array[i].start > data->contents.array[at].array[i].stop) {
- continue;
- }
+ if (data->contents.array[at].array[i].start > data->contents.array[at].array[i].stop) continue;
+ if ((!(data->option & fss_extended_read_data_option_original_d) || !data->quotes_content.array[at].array[i]) && data->contents.array[at].array[i].start > data->contents.array[at].array[i].stop) continue;
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[i]) {
- content_printed = F_true;
-
- f_print_dynamic_raw(
- data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_content.array[at].array[i] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
+ if (print_state & 0x8) {
+ fss_extended_read_print_content_end(main);
+ }
- if (data->contents.array[at].array[i].start <= data->contents.array[at].array[i].stop) {
- content_printed = F_true;
+ if ((print_state & 0x1) && !(print_state & 0x4)) {
+ print_state |= 0x4;
- f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[i], delimits_content, main->output.to.stream);
- }
+ fss_extended_read_print_object_end(main);
+ }
- if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[i]) {
- content_printed = F_true;
-
- f_print_dynamic_raw(
- data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e
- ? f_fss_quote_single_s
- : data->quotes_content.array[at].array[i] == f_fss_quote_type_double_e
- ? f_fss_quote_double_s
- : f_fss_quote_backtick_s,
- main->output.to.stream
- );
- }
+ print_state |= 0xa;
- if (i + 1 < data->contents.array[at].used && data->contents.array[at].array[i + 1].start <= data->contents.array[at].array[i + 1].stop) {
- fss_extended_read_print_content_end(main);
- }
- } // for
- }
- }
+ fss_extended_read_print_quote(main, data, data->quotes_content.array[at].array[i]);
- if ((data->option & fss_extended_read_data_option_object_d) || (data->option & fss_extended_read_data_option_content_d) && (content_printed || (data->option & fss_extended_read_data_option_empty_d))) {
- fss_extended_read_print_set_end(main);
+ if (data->contents.array[at].array[i].start <= data->contents.array[at].array[i].stop) {
+ f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[i], delimits_content, main->output.to.stream);
+ }
+
+ fss_extended_read_print_quote(main, data, data->quotes_content.array[at].array[i]);
+ } // for
}
+ }
- funlockfile(main->output.to.stream);
+ if (print_state & 0x3) {
+ fss_extended_read_print_set_end(main);
+ }
+ else if (data->option & fss_extended_read_data_option_content_d) {
+ fss_extended_read_print_content_end_empty(main);
}
+
+ funlockfile(main->output.to.stream);
}
#endif // _di_fss_extended_read_print_at_
}
#endif // _di_fss_extended_read_print_content_end_
+#ifndef _di_fss_extended_read_print_content_end_empty_
+ void fss_extended_read_print_content_end_empty(fll_program_data_t * const main) {
+
+ if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
+ f_print_dynamic_raw(fss_extended_read_pipe_content_end_s, main->output.to.stream);
+ }
+ }
+#endif // _di_fss_extended_read_print_content_end_empty_
+
#ifndef _di_fss_extended_read_print_object_end_
void fss_extended_read_print_object_end(fll_program_data_t * const main) {
}
#endif // _di_fss_extended_read_print_one_
+#ifndef _di_fss_extended_read_print_quote_
+ uint8_t fss_extended_read_print_quote(fll_program_data_t * const main, fss_extended_read_data_t * const data, const f_fss_quote_t quote) {
+
+ if (!(data->option & fss_extended_read_data_option_original_d) || !quote) return F_false;
+
+ f_print_dynamic_raw(
+ quote == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : quote == f_fss_quote_type_double_e
+ ? f_fss_quote_double_s
+ : f_fss_quote_backtick_s,
+ main->output.to.stream
+ );
+
+ return F_true;
+ }
+#endif // _di_fss_extended_read_print_quote_
+
#ifndef _di_fss_extended_read_print_set_end_
void fss_extended_read_print_set_end(fll_program_data_t * const main) {
#endif // _di_fss_extended_read_print_content_end_
/**
+ * Print the "empty" Content.
+ *
+ * This only prints the end Content start pipe character.
+ * This does not print the Content end pipe character to avoid conflicting with the calls to the set end function.
+ *
+ * This does not print the Content set end.
+ */
+#ifndef _di_fss_extended_read_print_content_end_empty_
+ extern void fss_extended_read_print_content_end_empty(fll_program_data_t * const main) F_attribute_visibility_internal_d;
+#endif // _di_fss_extended_read_print_content_end_empty_
+
+/**
* Print the end of an Object (which is essentially the start of Content).
*
* @param main
#endif // _di_fss_extended_read_print_one_
/**
+ * Print the quote surrounding an Object or Content.
+ *
+ * This only prints if there is a quote and the original flag is set.
+ *
+ * @param main
+ * The main program data.
+ * @param data
+ * The program data.
+ * @param quote
+ * The quote character.
+ *
+ * @return
+ * F_true on quote printed.
+ * F_false otherwise.
+ */
+#ifndef _di_fss_extended_read_print_quote_
+ extern uint8_t fss_extended_read_print_quote(fll_program_data_t * const main, fss_extended_read_data_t * const data, const f_fss_quote_t quote);
+#endif // _di_fss_extended_read_print_quote_
+
+/**
* Print the end of an Object/Content set.
*
* @param main
--- /dev/null
+"line...with some" random text
+nother line.
+b 'c d' \'e f' \\'g
--- /dev/null
+"line...with some" random text
+nother line.
+b 'c d' \'e f' \\'g
--- /dev/null
+there.
+there
+to
+and
+zero
+a
+one
+c
+e
+there
+bb
+bb
+another
+a
+a
+a
+"line...with some"
+nother
+b
+quoted,
+\"and
--- /dev/null
+you."
+so
+b
+d
+f
+zero
+"comment...should have"
+comment
+`comment either...should`
+random
+line.
+'c d'
+"yep".
+so
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
--- /dev/null
+\\hi there
--- /dev/null
+a "line...with some" random text
+a nother line.
+a b 'c d' \'e f' \\'g
--- /dev/null
+a "line...with some" random text
+a nother line.
+a b 'c d' \'e f' \\'g
--- /dev/null
+Hi there.
+\\hi there
+\\\\\\"Hello to
+"\\\\\" quoted stuff." and
+"" zero
+\"" a
+\" one
+"""" c
+"\" " e
+"\\\\\" sss" there
+"\\"\\\" xx" bb
+"\\"\\\"" bb
+"" another
+\#not a
+\\#not a
+\\\#not a
+a "line...with some"
+a nother
+a b
+"мир" quoted,
+"привет has space" \"and
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello you."
+"\\\\\" quoted stuff." so
+""
+\"" b
+\"
+"""" d
+"\" " f
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+"" zero
+\#not "comment...should have"
+\\#not comment
+\\\#not `comment either...should`
+a random
+a line.
+a 'c d'
+"мир" "yep".
+"привет has space" so
-Hi
-\\hi
+Hi
+\\hi
\\\\\"Hello you."
\\" quoted stuff. so
-
+
"" b
-"
+"
"" d
" f
-\\" sss
-\\"\" xx
-\\"\\\"
+\\" sss
+\\"\" xx
+\\"\\\"
zero
#not comment...should have
\#not comment
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
-Hi
-\\hi
-\\\\\"Hello
-\\" quoted stuff.
-
-""
+Hi
+\\hi
+\\\\\"Hello
+\\" quoted stuff.
+
+""
+"
+""
"
-""
-"
-\\" sss
-\\"\" xx
-\\"\\\"
-
-#not
-\#not
-\\#not
-a
-a
-a
-мир
-привет has space
+\\" sss
+\\"\" xx
+\\"\\\"
+
+#not
+\#not
+\\#not
+a
+a
+a
+мир
+привет has space
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
-Hi
-\\hi
-\\\\\"Hello
-\\" quoted stuff.
-
-""
+Hi
+\\hi
+\\\\\"Hello
+\\" quoted stuff.
+
+""
+"
+""
"
-""
-"
-\\" sss
-\\"\" xx
-\\"\\\"
-
-#not
-\#not
-\\#not
-a
-a
-a
-мир
-привет has space
+\\" sss
+\\"\" xx
+\\"\\\"
+
+#not
+\#not
+\\#not
+a
+a
+a
+мир
+привет has space
--- /dev/null
+Hi
+\\hi
+\\\\\\"Hello
+"\\\\\" quoted stuff."
+""
+\""
+\"
+""""
+"\" "
+"\\\\\" sss"
+"\\"\\\" xx"
+"\\"\\\""
+""
+\#not
+\\#not
+\\\#not
+a
+a
+a
+"мир"
+"привет has space"
-Hi
-\\hi
-\\\\\"Hello
-\\" quoted stuff.
-
-""
+Hi
+\\hi
+\\\\\"Hello
+\\" quoted stuff.
+
+""
+"
+""
"
-""
-"
-\\" sss
-\\"\" xx
-\\"\\\"
-
-#not
-\#not
-\\#not
-a
-a
-a
-мир
-привет has space
+\\" sss
+\\"\" xx
+\\"\\\"
+
+#not
+\#not
+\\#not
+a
+a
+a
+мир
+привет has space
--- /dev/null
+d zerowidth
--- /dev/null
+space! <-- should have the word 'space!'
--- /dev/null
+line܀܀܀with some random text
--- /dev/null
+b k d3a
+line܀܀܀with some random text
+偐 ぐ
+b c d e f ሴ䌡
--- /dev/null
+b k d3a
+line܀܀܀with some random text
+偐 ぐ
+b c d e f ሴ䌡
--- /dev/null
+b
+d
+мир
+e␠
+out
+space!
+line܀܀܀with
+偐
+b
+"and so does this"
--- /dev/null
+k
+zerowidth
+h
+<--
+some
+ぐ
+c
+"ሴ 䌡"
--- /dev/null
+a
+a
+a
+a
--- /dev/null
+a
+a
+a
+a
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+"привет has space"
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+"привет has space"
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+"привет has space"
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+"привет has space"
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+"привет has space"
--- /dev/null
+c d zerowidth
--- /dev/null
+UTF space! <-- should have the word 'space!'
--- /dev/null
+a b k d3a
+a line܀܀܀with some random text
+a 偐 ぐ
+a b c d e f ሴ䌡
--- /dev/null
+a b k d3a
+a line܀܀܀with some random text
+a 偐 ぐ
+a b c d e f ሴ䌡
мир e␠
spaced out
UTF space! <-- should have the word 'space!'
-hi
+hi
a line܀܀܀with some random text
a 偐 ぐ
a b c d e f ሴ䌡
--- /dev/null
+a b
+c d
+привет мир
+мир e␠
+spaced out
+UTF space!
+hi
+a line܀܀܀with
+a 偐
+a b
+"привет has space" "and so does this"
мир e␠
spaced out
UTF space!
-hi
+hi
a line܀܀܀with
a 偐
a b
--- /dev/null
+a k
+c zerowidth
+привет h
+мир
+spaced
+UTF <--
+hi
+a some
+a ぐ
+a c
+"привет has space" "ሴ 䌡"
a k
c zerowidth
привет h
-мир
-spaced
+мир
+spaced
UTF <--
-hi
+hi
a some
a ぐ
a c
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+"привет has space"
-a
-c
-привет
-мир
-spaced
-UTF
-hi
-a
-a
-a
-привет has space
+a
+c
+привет
+мир
+spaced
+UTF
+hi
+a
+a
+a
+привет has space
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF word
+hi
+a
+a
+a ሴ䌡
+"привет has space"
-a
-c
-привет
-мир
-spaced
+a
+c
+привет
+мир
+spaced
UTF word
-hi
-a
-a
+hi
+a
+a
a ሴ䌡
-привет has space
+привет has space
--- /dev/null
+a
+c
+привет
+мир
+spaced
+UTF 'space!'
+hi
+a
+a
+a
+"привет has space"
-a
-c
-привет
-мир
-spaced
+a
+c
+привет
+мир
+spaced
UTF space!
-hi
-a
-a
-a
-привет has space
+hi
+a
+a
+a
+привет has space
мир e␠
spaced out
UTF space! <-- should have the word space!
-hi
+hi
a line܀܀܀with some random text
a 偐 ぐ
a b c d e f ሴ䌡
мир e␠
spaced out
UTF space! <-- should have the word space!
-hi
+hi
a line܀܀܀with some random text
a 偐 ぐ
a b c d e f ሴ䌡
fss_extended_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_extended_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_extended_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_extended_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_extended_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_extended_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_extended_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_extended_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_extended_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_extended_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_extended_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_extended_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_extended_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_extended_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_extended_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_extended_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_extended_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_extended_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_extended_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_extended_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_extended_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_extended_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_extended_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_extended_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_extended_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_extended_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_extended_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_extended_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_extended_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_extended_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_extended_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_extended_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_extended_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_extended_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_extended_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_extended_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_extended_read +n -ont a ${file_source} > ${test_current}object-name-a-total.expect &&
fss_extended_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_extended_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_extended_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_extended_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_extended_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_extended_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_extended_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_extended_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
fss_extended_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_extended_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_extended_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_extended_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_extended_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_extended_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_extended_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_extended_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_extended_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_extended_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_extended_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_extended_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_extended_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_extended_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_extended_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_extended_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_extended_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_extended_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_extended_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_extended_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_extended_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_extended_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_extended_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_extended_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_extended_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_extended_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_extended_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_extended_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_extended_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_extended_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_extended_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_extended_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_extended_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_extended_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_extended_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_extended_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_extended_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_extended_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_extended_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_extended_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_extended_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_extended_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_extended_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_extended_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_extended_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
unset generate_cleanup
}
-generate_main $*
+generate_main "$@"
verify_main() {
local path_build="${1}"
local path_expect="${2}"
+ local test_name="${3}"
local failure=0
local basename_file=
local hash_build=
return 1
fi
+ if [[ $test_name != "" ]] ; then
+ test_name=" for ${test_name}"
+ fi
+
verify_operate_test_standard
if [[ ${failure} -eq 1 ]] ; then
}
verify_operate_test_standard() {
+ local -i fail=0
+ local -i success=0
+ local message=" (Did not run tests)"
+ local i=
for i in ${path_build}* ; do
if [[ $hash_build == $hash_expect ]] ; then
echo "[ Success ] ${basename_file}."
+
+ let success++
else
echo "[ Failure ] ${basename_file}."
let failure=1
+ let fail++
fi
done
+ if [[ $fail -gt 0 || $success -gt 0 ]] ; then
+ message=" (Success: $success, Fail: $fail)"
+ fi
+
echo
if [[ $failure -eq 1 ]] ; then
- echo "Failure! Some or all tests failed."
+ echo "Failure! Some or all tests failed${message}${test_name}."
else
- echo "Success! All tests passed."
+ echo "Success! All tests passed${message}${test_name}."
fi
return $failure
unset verify_cleanup
}
-verify_main $*
+verify_main "$@"
--- /dev/null
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+ a second "a".
--- /dev/null
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+ a second "a".
--- /dev/null
+ b c
+
+not:valid: list
+
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+ мир
+
+ z
+ quoted, "yep".
+ \"and so does this" "have space"
+ But still a valid list.
+ Check this.
+ ...
+ a second "a".
+
+This can be anything and is considered binary.
+a:
+ should not be processed.
--- /dev/null
+привет has space
--- /dev/null
+empty
+d
+a
+привет
+y
+"мир"
+привет has space
+"This is quoted"
+AlsoGood
+hi
+привет has space
+a
+also_empty
+payload
--- /dev/null
+a:
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+a:
+ a second "a".
--- /dev/null
+a:
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+a:
+ a second "a".
--- /dev/null
+empty:
+d:
+ b c
+
+not:valid: list
+
+a:
+ e f
+ g h
+
+hi\:
+Not a \\\:
+list
+
+привет:
+ мир
+
+y :
+ z
+"мир":
+ quoted, "yep".
+привет has space:
+ \"and so does this" "have space"
+"This is quoted":
+ But still a valid list.
+AlsoGood:
+hi :
+ Check this.
+привет has space :
+ ...
+a:
+ a second "a".
+also_empty:
+payload:
+
+This can be anything and is considered binary.
+a:
+ should not be processed.
--- /dev/null
+ The object name is an empty string.
--- /dev/null
+ should not be processed.
--- /dev/null
+ The object name is an empty string.
+
+ Quotes aren't supported here, so this is not an empty object..
+
+This can be anything and is considered binary.
+:
+ should not be processed.
--- /dev/null
+a
+hi
+a
+a
+
+
+""
+payload
--- /dev/null
+ The object name is an empty string.
--- /dev/null
+a:
+a:
+a :
--- /dev/null
+a:
+a:
+a :
--- /dev/null
+a:
+hi:
+a:
+a :
+:
+ The object name is an empty string.
+
+:
+"":
+ Quotes aren't supported here, so this is not an empty object..
+payload:
+
+This can be anything and is considered binary.
+:
+ should not be processed.
--- /dev/null
+a b привет
--- /dev/null
+привет мир a
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ another "A" list.
--- /dev/null
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+ with content.
+ another "A" list.
+ quoted, "yep".
+ But this is not a comment.
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+ yep.
+ fin
+ ...
+hi:
+ Not a list.
--- /dev/null
+\# a valid list
--- /dev/null
+a
+\# a valid list
+a
+"мир"
+привет has space
+empty
+hi
+has spaces
+payload
--- /dev/null
+a b привет
--- /dev/null
+\\# even this is not.
--- /dev/null
+привет мир a
--- /dev/null
+a:
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+a:
+ another "A" list.
--- /dev/null
+a:
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+a:
+ another "A" list.
--- /dev/null
+a:
+a b привет
+c d
+ \# not a comment
+ \\\# nor is this.
+\\# even this is not.
+привет мир a
+
+\# a valid list:
+ with content.
+a:
+ another "A" list.
+"мир":
+ quoted, "yep".
+привет has space:
+ But this is not a comment.
+empty:
+hi:
+ not a list\:
+ a b привет
+ c d
+ привет мир a
+
+has spaces :
+ yep.
+ fin
+payload:
+ ...
+hi:
+ Not a list.
fss_payload_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_payload_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_payload_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_payload_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_payload_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_payload_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_payload_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_payload_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_payload_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_payload_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_payload_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_payload_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_payload_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_payload_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_payload_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_payload_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_payload_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_payload_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_payload_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_payload_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_payload_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_payload_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_payload_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_payload_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_payload_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_payload_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_payload_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_payload_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_payload_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_payload_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_payload_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_payload_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_payload_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_payload_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_payload_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_payload_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_payload_read +n -ont a ${file_source} > ${test_current}object-name-a-total.expect &&
fss_payload_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_payload_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_payload_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_payload_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_payload_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_payload_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_payload_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_payload_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
fss_payload_read +n -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
fss_payload_read +n -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
fss_payload_read +n -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_payload_read +n -clO 0 ${file_source} > ${test_current}content-line-0-original.expect &&
+ fss_payload_read +n -clO 1 ${file_source} > ${test_current}content-line-1-original.expect &&
+ fss_payload_read +n -clO 5 ${file_source} > ${test_current}content-line-5-original.expect &&
+ fss_payload_read +n -clO 6 ${file_source} > ${test_current}content-line-6-original.expect &&
+ fss_payload_read +n -clO 100 ${file_source} > ${test_current}content-line-100-original.expect &&
fss_payload_read +n -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
fss_payload_read +n -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
fss_payload_read +n -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
fss_payload_read +n -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
fss_payload_read +n -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_payload_read +n -csO 0 ${file_source} > ${test_current}content-select-0-original.expect &&
+ fss_payload_read +n -csO 1 ${file_source} > ${test_current}content-select-1-original.expect &&
+ fss_payload_read +n -csO 5 ${file_source} > ${test_current}content-select-5-original.expect &&
+ fss_payload_read +n -csO 6 ${file_source} > ${test_current}content-select-6-original.expect &&
+ fss_payload_read +n -csO 100 ${file_source} > ${test_current}content-select-100-original.expect &&
fss_payload_read +n -cC ${file_source} > ${test_current}content-columns.expect &&
fss_payload_read +n -cCe ${file_source} > ${test_current}content-columns-empty.expect &&
fss_payload_read +n -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
fss_payload_read +n -cn a ${file_source} > ${test_current}content-name-a.expect &&
fss_payload_read +n -cnC a ${file_source} > ${test_current}content-name-a-columns.expect &&
fss_payload_read +n -cnCe a ${file_source} > ${test_current}content-name-a-columns-empty.expect &&
+ fss_payload_read +n -cnO a ${file_source} > ${test_current}content-name-a-original.expect &&
+ fss_payload_read +n -cnOe a ${file_source} > ${test_current}content-name-a-original-empty.expect &&
fss_payload_read +n -cn "" ${file_source} > ${test_current}content-name-.expect &&
fss_payload_read +n -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
fss_payload_read +n -cn "привет has space" ${file_source} > ${test_current}content-name-привет_has_space.expect &&
fss_payload_read +n -on a ${file_source} > ${test_current}object-name-a.expect &&
fss_payload_read +n -onC a ${file_source} > ${test_current}object-name-a-columns.expect &&
fss_payload_read +n -onCe a ${file_source} > ${test_current}object-name-a-columns-empty.expect &&
+ fss_payload_read +n -onO a ${file_source} > ${test_current}object-name-a-original.expect &&
+ fss_payload_read +n -onOe a ${file_source} > ${test_current}object-name-a-original-empty.expect &&
fss_payload_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_payload_read +n -ont hi ${file_source} > ${test_current}object-name-hi-total.expect &&
fss_payload_read +n -ont payload ${file_source} > ${test_current}object-name-payload-total.expect &&
fss_payload_read +n -ocn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
fss_payload_read +n -ocnC a ${file_source} > ${test_current}object_and_content-name-a-columns.expect &&
fss_payload_read +n -ocnCe a ${file_source} > ${test_current}object_and_content-name-a-columns-empty.expect &&
+ fss_payload_read +n -ocnO a ${file_source} > ${test_current}object_and_content-name-a-original.expect &&
+ fss_payload_read +n -ocnOe a ${file_source} > ${test_current}object_and_content-name-a-original-empty.expect &&
fss_payload_read +n -ocn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
fss_payload_read +n -ocn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
fss_payload_read +n -ocn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
unset generate_cleanup
}
-generate_main $*
+generate_main "$@"
verify_main() {
local path_build="${1}"
local path_expect="${2}"
+ local test_name="${3}"
local failure=0
local basename_file=
local hash_build=
return 1
fi
+ if [[ $test_name != "" ]] ; then
+ test_name=" for ${test_name}"
+ fi
+
verify_operate_test_standard
if [[ ${failure} -eq 1 ]] ; then
}
verify_operate_test_standard() {
+ local -i fail=0
+ local -i success=0
+ local message=" (Did not run tests)"
+ local i=
for i in ${path_build}* ; do
if [[ $hash_build == $hash_expect ]] ; then
echo "[ Success ] ${basename_file}."
+
+ let success++
else
echo "[ Failure ] ${basename_file}."
let failure=1
+ let fail++
fi
done
+ if [[ $fail -gt 0 || $success -gt 0 ]] ; then
+ message=" (Success: $success, Fail: $fail)"
+ fi
+
echo
if [[ $failure -eq 1 ]] ; then
- echo "Failure! Some or all tests failed."
+ echo "Failure! Some or all tests failed${message}${test_name}."
else
- echo "Success! All tests passed."
+ echo "Success! All tests passed${message}${test_name}."
fi
return $failure
unset verify_cleanup
}
-verify_main $*
+verify_main "$@"