Changeset 829 in openpam
- Timestamp:
- Oct 23, 2014, 8:26:17 AM (7 years ago)
- Location:
- branches/nooath
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nooath
-
branches/nooath/t/t_openpam_readword.c
r826 r829 171 171 } 172 172 173 T_FUNC(line_continuation_in_whitespace, "line continuation in whitespace")174 {175 struct t_file *tf;176 int ret;177 178 tf = t_fopen(NULL);179 t_fprintf(tf, " \\\n \n");180 t_frewind(tf);181 ret = orw_expect(tf, NULL, 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);182 t_fclose(tf);183 return (ret);184 }185 186 173 T_FUNC(comment, "comment") 187 174 { … … 900 887 t_frewind(tf); 901 888 ret = orw_expect(tf, "\"", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/); 889 t_fclose(tf); 890 return (ret); 891 } 892 893 894 895 /*************************************************************************** 896 * Line continuation 897 */ 898 899 T_FUNC(line_continuation_within_whitespace, "line continuation within whitespace") 900 { 901 struct t_file *tf; 902 int ret; 903 904 tf = t_fopen(NULL); 905 t_fprintf(tf, " \\\n \n"); 906 t_frewind(tf); 907 ret = orw_expect(tf, NULL, 1 /*lines*/, 0 /*eof*/, 1 /*eol*/); 908 t_fclose(tf); 909 return (ret); 910 } 911 912 T_FUNC(line_continuation_before_whitespace, "line continuation before whitespace") 913 { 914 struct t_file *tf; 915 int ret; 916 917 tf = t_fopen(NULL); 918 t_fprintf(tf, "xyzzy\\\n \n"); 919 t_frewind(tf); 920 ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 0 /*eol*/) && 921 orw_expect(tf, NULL, 0 /*lines*/, 0 /*eof*/, 1 /*eol*/); 922 t_fclose(tf); 923 return (ret); 924 } 925 926 T_FUNC(line_continuation_after_whitespace, "line continuation after whitespace") 927 { 928 struct t_file *tf; 929 int ret; 930 931 tf = t_fopen(NULL); 932 t_fprintf(tf, " \\\nxyzzy\n"); 933 t_frewind(tf); 934 ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/); 935 t_fclose(tf); 936 return (ret); 937 } 938 939 T_FUNC(line_continuation_within_word, "line continuation within word") 940 { 941 struct t_file *tf; 942 int ret; 943 944 tf = t_fopen(NULL); 945 t_fprintf(tf, "xyz\\\nzy\n"); 946 t_frewind(tf); 947 ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/); 902 948 t_fclose(tf); 903 949 return (ret); … … 916 962 T(single_whitespace), 917 963 T(multiple_whitespace), 918 T(line_continuation_in_whitespace),919 964 T(comment), 920 965 T(whitespace_before_comment), … … 973 1018 T(escaped_double_quote_within_double_quotes), 974 1019 1020 T(line_continuation_within_whitespace), 1021 T(line_continuation_before_whitespace), 1022 T(line_continuation_after_whitespace), 1023 T(line_continuation_within_word), 1024 975 1025 NULL 976 1026 };
Note: See TracChangeset
for help on using the changeset viewer.