- Timestamp:
- Feb 11, 2024, 3:01:53 PM (9 months ago)
- Branches:
- master
- Children:
- 7b93027e
- Parents:
- 9d4628b
- Location:
- tests/configs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/configs/parsebools.cfa
r9d4628b r0b6089f 10 10 // Author : Thierry Delisle 11 11 // Created On : Wed Oct 12 15:28:01 2022 12 // Last Modified By : 13 // Last Modified On : 14 // Update Count : 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Sun Feb 11 09:26:13 2024 14 // Update Count : 2 15 15 // 16 16 17 17 #include <fstream.hfa> 18 19 18 #include "../meta/fork+exec.hfa" 20 19 … … 22 21 #include <parseargs.hfa> 23 22 24 int main( int argc, char * argv[]) {23 int main( int argc, char * argv[] ) { 25 24 check_main(argv[0]); 26 25 … … 41 40 42 41 char **left; 43 parse_args( options, "[OPTIONS]...\ntesting bool parameters", left );42 parse_args( options, "[OPTIONS]...\ntesting bool parameters", left ); 44 43 45 44 sout | "yes/no :" | YN; … … 51 50 } 52 51 53 int true_main( const char * path, char * env[]) {54 printf( "no arg:\n");55 if (pid_t child = strict_fork(); child == 0) {56 int ret = execle( path, "parsebools", (const char*)0p, env);57 if (ret < 0) {58 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno));59 exit( 1);52 int true_main( const char * path, char * env[] ) { 53 printf( "no arg:\n" ); 54 if ( pid_t child = strict_fork(); child == 0 ) { 55 int ret = execle( path, "parsebools", (const char*)0p, env ); 56 if ( ret < 0 ) { 57 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 58 exit( 1 ); 60 59 } 61 } 62 else { 63 int status = do_wait(child); 64 print_status(status); 65 } 60 } else { 61 int status = do_wait( child ); 62 print_status( status ); 63 } // if 66 64 67 printf("all true/set arg:\n"); 68 if(pid_t child = strict_fork(); child == 0) { 69 int ret = execle(path, "parsebools", "-e=yes", "-y=Y", "-n=y", "-t=true", "-s", "-u", (const char*)0p, env); 70 if(ret < 0) { 71 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 72 exit(1); 73 } 74 } 75 else { 76 int status = do_wait(child); 77 print_status(status); 78 } 65 printf( "all true/set arg:\n" ); 66 if ( pid_t child = strict_fork(); child == 0 ) { 67 int ret = execle( path, "parsebools", "-e=yes", "-y=Y", "-n=y", "-t=true", "-s", "-u", (const char*)0p, env ); 68 if ( ret < 0 ) { 69 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 70 exit( 1 ); 71 } // if 72 } else { 73 int status = do_wait( child ); 74 print_status( status ); 75 } // if 79 76 80 printf("all false/unset arg:\n"); 81 if(pid_t child = strict_fork(); child == 0) { 82 int ret = execle(path, "parsebools", "-e=no", "-y=N", "-n=n", "-t=false", (const char*)0p, env); 83 if(ret < 0) { 84 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 85 exit(1); 86 } 87 } 88 else { 89 int status = do_wait(child); 90 print_status(status); 91 } 77 printf( "all false/unset arg:\n" ); 78 if ( pid_t child = strict_fork(); child == 0 ) { 79 int ret = execle( path, "parsebools", "-e=no", "-y=N", "-n=n", "-t=false", (const char*)0p, env ); 80 if ( ret < 0 ) { 81 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 82 exit( 1 ); 83 } // if 84 } else { 85 int status = do_wait( child ); 86 print_status( status ); 87 } // if 92 88 93 printf("gibberish arg 1:\n"); 94 if(pid_t child = strict_fork(); child == 0) { 95 int ret = execle(path, "parsebools", "-y=true", (const char*)0p, env); 96 if(ret < 0) { 97 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 98 exit(1); 99 } 100 } 101 else { 102 int status = do_wait(child); 103 print_status(status); 104 } 89 printf( "gibberish arg 1:\n" ); 90 if ( pid_t child = strict_fork(); child == 0 ) { 91 int ret = execle( path, "parsebools", "-y=true", (const char*)0p, env ); 92 if ( ret < 0 ) { 93 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 94 exit( 1 ); 95 } // if 96 } else { 97 int status = do_wait( child ); 98 print_status( status ); 99 } // if 105 100 106 printf("gibberish arg 2:\n"); 107 if(pid_t child = strict_fork(); child == 0) { 108 int ret = execle(path, "parsebools", "-t=yes", (const char*)0p, env); 109 if(ret < 0) { 110 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 111 exit(1); 112 } 113 } 114 else { 115 int status = do_wait(child); 116 print_status(status); 117 } 101 printf( "gibberish arg 2:\n" ); 102 if ( pid_t child = strict_fork(); child == 0 ) { 103 int ret = execle( path, "parsebools", "-t=yes", (const char*)0p, env ); 104 if ( ret < 0 ) { 105 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 106 exit( 1 ); 107 } // if 108 } else { 109 int status = do_wait( child ); 110 print_status( status ); 111 } // if 118 112 119 printf("gibberish arg 3:\n"); 120 if(pid_t child = strict_fork(); child == 0) { 121 int ret = execle(path, "parsebools", "-s=yes", (const char*)0p, env); 122 if(ret < 0) { 123 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 124 exit(1); 125 } 126 } 127 else { 128 int status = do_wait(child); 129 print_status(status); 130 } 113 printf( "gibberish arg 3:\n" ); 114 if ( pid_t child = strict_fork(); child == 0 ) { 115 int ret = execle( path, "parsebools", "-s=yes", (const char*)0p, env ); 116 if ( ret < 0 ) { 117 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 118 exit( 1 ); 119 } // if 120 } else { 121 int status = do_wait( child ); 122 print_status( status ); 123 } // if 131 124 132 printf("gibberish arg 4:\n"); 133 if(pid_t child = strict_fork(); child == 0) { 134 int ret = execle(path, "parsebools", "-u=yes", (const char*)0p, env); 135 if(ret < 0) { 136 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 137 exit(1); 138 } 139 } 140 else { 141 int status = do_wait(child); 142 print_status(status); 143 } 125 printf( "gibberish arg 4:\n" ); 126 if ( pid_t child = strict_fork(); child == 0 ) { 127 int ret = execle( path, "parsebools", "-u=yes", ( const char*)0p, env ); 128 if ( ret < 0 ) { 129 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 130 exit( 1 ); 131 } // if 132 } else { 133 int status = do_wait( child ); 134 print_status( status ); 135 } // if 144 136 145 printf( "All Done!\n");137 printf( "All Done!\n" ); 146 138 147 139 return 0; -
tests/configs/parsenums.cfa
r9d4628b r0b6089f 32 32 #endif 33 33 34 int true_main( const char * exec);35 36 int main( int argc, char * argv[]) {37 check_main( argv[0]);34 int true_main( const char * exec ); 35 36 int main( int argc, char * argv[]) { 37 check_main( argv[0]); 38 38 39 39 int i = -3; … … 52 52 53 53 char **left; 54 parse_args( options, "[OPTIONS]...\ntesting bool parameters", left );54 parse_args( options, "[OPTIONS]...\ntesting bool parameters", left ); 55 55 56 56 sout | "int :" | i; … … 61 61 } 62 62 63 int true_main(const char * path, char * env[]) { 64 printf("no arg:\n"); 65 if(pid_t child = strict_fork(); child == 0) { 66 int ret = execle(path, "parsenums", (const char*)0p, env); 67 if(ret < 0) { 68 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 69 exit(1); 70 } 71 } 72 else { 73 int status = do_wait(child); 74 print_status(status); 75 } 76 77 printf("all 0 arg:\n"); 78 if(pid_t child = strict_fork(); child == 0) { 79 int ret = execle(path, "parsenums", "-i=0", "-u=0", "-l=0", "-L=0", "-d=0", (const char*)0p, env); 80 if(ret < 0) { 81 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 82 exit(1); 83 } 84 } 85 else { 86 int status = do_wait(child); 87 print_status(status); 88 } 89 90 printf("negative vals arg:\n"); 91 if(pid_t child = strict_fork(); child == 0) { 92 int ret = execle(path, "parsenums", "-i=-1", "-d=-1", (const char*)0p, env); 93 if(ret < 0) { 94 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 95 exit(1); 96 } 97 } 98 else { 99 int status = do_wait(child); 100 print_status(status); 101 } 102 103 printf("funky notation arg:\n"); 104 if(pid_t child = strict_fork(); child == 0) { 105 int ret = execle(path, "parsenums", "-i=0x10", "-u=0x20", "-l=0x300", "-L=0x4000", "-d=5e6", (const char*)0p, env); 106 if(ret < 0) { 107 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 108 exit(1); 109 } 110 } 111 else { 112 int status = do_wait(child); 113 print_status(status); 114 } 115 116 printf("big values arg:\n"); 117 if(pid_t child = strict_fork(); child == 0) { 118 int ret = execle(path, "parsenums", "-i=2147483647", "-u=4294967295", "-l=" BIG_UNSIGNED_LONG, "-L=18446744073709551615", "-d=5e6", (const char*)0p, env); 119 if(ret < 0) { 120 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 121 exit(1); 122 } 123 } 124 else { 125 int status = do_wait(child); 126 print_status(status); 127 } 128 129 printf("too big values arg:\n"); 130 if(pid_t child = strict_fork(); child == 0) { 131 int ret = execle(path, "parsenums", "-i=2147483648", (const char*)0p, env); 132 if(ret < 0) { 133 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 134 exit(1); 135 } 136 } 137 else { 138 int status = do_wait(child); 139 print_status(status); 140 } 141 142 if(pid_t child = strict_fork(); child == 0) { 143 int ret = execle(path, "parsenums", "-u=4294967296", (const char*)0p, env); 144 if(ret < 0) { 145 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 146 exit(1); 147 } 148 } 149 else { 150 int status = do_wait(child); 151 print_status(status); 152 } 153 154 if(pid_t child = strict_fork(); child == 0) { 155 int ret = execle(path, "parsenums", "-l=" TOO_BIG_UNSIGNED_LONG, (const char*)0p, env); 156 if(ret < 0) { 157 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 158 exit(1); 159 } 160 } 161 else { 162 int status = do_wait(child); 163 print_status(status); 164 } 165 166 if(pid_t child = strict_fork(); child == 0) { 167 int ret = execle(path, "parsenums", "-L=18446744073709551616", (const char*)0p, env); 168 if(ret < 0) { 169 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 170 exit(1); 171 } 172 } 173 else { 174 int status = do_wait(child); 175 print_status(status); 176 } 177 178 printf("negative errors arg:\n"); 179 if(pid_t child = strict_fork(); child == 0) { 180 int ret = execle(path, "parsenums", "-u=-1", (const char*)0p, env); 181 if(ret < 0) { 182 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 183 exit(1); 184 } 185 } 186 else { 187 int status = do_wait(child); 188 print_status(status); 189 } 190 191 if(pid_t child = strict_fork(); child == 0) { 192 int ret = execle(path, "parsenums", "-l=-1", (const char*)0p, env); 193 if(ret < 0) { 194 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 195 exit(1); 196 } 197 } 198 else { 199 int status = do_wait(child); 200 print_status(status); 201 } 202 203 if(pid_t child = strict_fork(); child == 0) { 204 int ret = execle(path, "parsenums", "-L=-1", (const char*)0p, env); 205 if(ret < 0) { 206 fprintf(stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror(errno)); 207 exit(1); 208 } 209 } 210 else { 211 int status = do_wait(child); 212 print_status(status); 213 } 214 215 printf("All Done!\n"); 63 int true_main( const char * path, char * env[] ) { 64 printf( "no arg:\n" ); 65 if ( pid_t child = strict_fork(); child == 0 ) { 66 int ret = execle( path, "parsenums", (const char*)0p, env ); 67 if ( ret < 0 ) { 68 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 69 exit( 1 ); 70 } // if 71 } else { 72 int status = do_wait( child ); 73 print_status( status ); 74 } // if 75 76 printf( "all 0 arg:\n" ); 77 if ( pid_t child = strict_fork(); child == 0 ) { 78 int ret = execle( path, "parsenums", "-i=0", "-u=0", "-l=0", "-L=0", "-d=0", (const char*)0p, env ); 79 if ( ret < 0 ) { 80 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 81 exit( 1 ); 82 } // if 83 } else { 84 int status = do_wait( child ); 85 print_status( status ); 86 } // if 87 88 printf( "negative vals arg:\n" ); 89 if ( pid_t child = strict_fork(); child == 0 ) { 90 int ret = execle( path, "parsenums", "-i=-1", "-d=-1", (const char*)0p, env ); 91 if ( ret < 0 ) { 92 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 93 exit( 1 ); 94 } // if 95 } else { 96 int status = do_wait( child ); 97 print_status( status ); 98 } // if 99 100 printf( "funky notation arg:\n" ); 101 if ( pid_t child = strict_fork(); child == 0 ) { 102 int ret = execle( path, "parsenums", "-i=0x10", "-u=0x20", "-l=0x300", "-L=0x4000", "-d=5e6", (const char*)0p, env ); 103 if ( ret < 0 ) { 104 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 105 exit( 1 ); 106 } // if 107 } else { 108 int status = do_wait( child ); 109 print_status( status ); 110 } // if 111 112 printf( "big values arg:\n" ); 113 if ( pid_t child = strict_fork(); child == 0 ) { 114 int ret = execle( path, "parsenums", "-i=2147483647", "-u=4294967295", "-l=" BIG_UNSIGNED_LONG, "-L=18446744073709551615", "-d=5e6", (const char*)0p, env ); 115 if ( ret < 0 ) { 116 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 117 exit( 1 ); 118 } // if 119 } else { 120 int status = do_wait( child ); 121 print_status( status ); 122 } // if 123 124 printf( "too big values arg:\n" ); 125 if ( pid_t child = strict_fork(); child == 0 ) { 126 int ret = execle( path, "parsenums", "-i=2147483648", (const char*)0p, env ); 127 if ( ret < 0 ) { 128 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 129 exit( 1 ); 130 } // if 131 } else { 132 int status = do_wait( child ); 133 print_status( status ); 134 } // if 135 136 if ( pid_t child = strict_fork(); child == 0 ) { 137 int ret = execle( path, "parsenums", "-u=4294967296", (const char*)0p, env ); 138 if ( ret < 0 ) { 139 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 140 exit( 1 ); 141 } // if 142 } else { 143 int status = do_wait( child ); 144 print_status( status ); 145 } // if 146 147 if ( pid_t child = strict_fork(); child == 0 ) { 148 int ret = execle( path, "parsenums", "-l=" TOO_BIG_UNSIGNED_LONG, (const char*)0p, env ); 149 if ( ret < 0 ) { 150 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 151 exit( 1 ); 152 } // if 153 } else { 154 int status = do_wait( child ); 155 print_status( status ); 156 } // if 157 158 if ( pid_t child = strict_fork(); child == 0 ) { 159 int ret = execle( path, "parsenums", "-L=18446744073709551616", (const char*)0p, env ); 160 if ( ret < 0 ) { 161 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 162 exit( 1 ); 163 } // if 164 } else { 165 int status = do_wait( child ); 166 print_status( status ); 167 } // if 168 169 printf( "negative errors arg:\n" ); 170 if ( pid_t child = strict_fork(); child == 0 ) { 171 int ret = execle( path, "parsenums", "-u=-1", (const char*)0p, env ); 172 if ( ret < 0 ) { 173 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 174 exit( 1 ); 175 } // if 176 } else { 177 int status = do_wait( child ); 178 print_status( status ); 179 } // if 180 181 if ( pid_t child = strict_fork(); child == 0 ) { 182 int ret = execle( path, "parsenums", "-l=-1", (const char*)0p, env ); 183 if ( ret < 0 ) { 184 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 185 exit( 1 ); 186 } // if 187 } else { 188 int status = do_wait( child ); 189 print_status( status ); 190 } // if 191 192 if ( pid_t child = strict_fork(); child == 0 ) { 193 int ret = execle( path, "parsenums", "-L=-1", (const char*)0p, env ); 194 if ( ret < 0 ) { 195 fprintf( stderr, "Execl 2 returned with error: %d '%s'\n", errno, strerror( errno ) ); 196 exit( 1 ); 197 } // if 198 } else { 199 int status = do_wait( child ); 200 print_status( status ); 201 } // if 202 203 printf( "All Done!\n" ); 216 204 217 205 return 0; -
tests/configs/usage.cfa
r9d4628b r0b6089f 10 10 // Author : Thierry Delisle 11 11 // Created On : Wed Oct 12 15:28:01 2022 12 // Last Modified By : 13 // Last Modified On : 14 // Update Count : 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Sun Feb 11 09:29:51 2024 14 // Update Count : 1 15 15 // 16 16 … … 24 24 25 25 sout | "No args, no errors"; 26 if (pid_t child = strict_fork(); child == 0) {26 if ( pid_t child = strict_fork(); child == 0 ) { 27 27 array( cfa_option, 0 ) opts; 28 print_args_usage(1, fake_argv, opts, "Test usage", false); 29 } 30 else { 31 int status = do_wait(child); 32 print_status(status); 33 } 28 print_args_usage(1, fake_argv, opts, "Test usage", false ); 29 } else { 30 int status = do_wait( child ); 31 print_status( status ); 32 } // if 34 33 35 34 sout | "No args, with errors"; 36 if (pid_t child = strict_fork(); child == 0) {35 if ( pid_t child = strict_fork(); child == 0 ) { 37 36 array( cfa_option, 0 ) opts; 38 print_args_usage(1, fake_argv, opts, "Test usage", true); 39 } 40 else { 41 int status = do_wait(child); 42 print_status(status); 43 } 37 print_args_usage(1, fake_argv, opts, "Test usage", true ); 38 } else { 39 int status = do_wait( child ); 40 print_status( status ); 41 } // if 44 42 45 43 sout | "Args with short names only:"; 46 if (pid_t child = strict_fork(); child == 0) {44 if ( pid_t child = strict_fork(); child == 0 ) { 47 45 int a, b, c; 48 46 array( cfa_option, 3 ) opts; … … 50 48 opts[1] = (cfa_option){'b', "", "Second arg", b }; 51 49 opts[2] = (cfa_option){'c', "", "Third arg", c }; 52 print_args_usage(1, fake_argv, opts, "Test usage", false); 53 } 54 else { 55 int status = do_wait(child); 56 print_status(status); 57 } 50 print_args_usage(1, fake_argv, opts, "Test usage", false ); 51 } else { 52 int status = do_wait( child ); 53 print_status( status ); 54 } // if 58 55 59 56 sout | "Args with long names only:"; 60 if (pid_t child = strict_fork(); child == 0) {57 if ( pid_t child = strict_fork(); child == 0 ) { 61 58 int a, b, c; 62 59 array( cfa_option, 3 ) opts; … … 64 61 opts[1] = (cfa_option){'\0', "BB", "Second arg", b }; 65 62 opts[2] = (cfa_option){'\0', "CC", "Third arg", c }; 66 print_args_usage(1, fake_argv, opts, "Test usage", false); 67 } 68 else { 69 int status = do_wait(child); 70 print_status(status); 71 } 63 print_args_usage(1, fake_argv, opts, "Test usage", false ); 64 } else { 65 int status = do_wait( child ); 66 print_status( status ); 67 } // if 72 68 73 69 sout | "Mix of short and long args:"; 74 if (pid_t child = strict_fork(); child == 0) {70 if ( pid_t child = strict_fork(); child == 0 ) { 75 71 int a, b, c; 76 72 array( cfa_option, 3 ) opts; … … 78 74 opts[1] = (cfa_option){'b', "BBBB", "Second arg", b }; 79 75 opts[2] = (cfa_option){'\0', "CC", "Third arg", c }; 80 print_args_usage(1, fake_argv, opts, "Test usage", false); 81 } 82 else { 83 int status = do_wait(child); 84 print_status(status); 85 } 76 print_args_usage(1, fake_argv, opts, "Test usage", false ); 77 } else { 78 int status = do_wait( child ); 79 print_status( status ); 80 } // if 86 81 87 82 sout | "Mix of short and long and some missing description:"; 88 if (pid_t child = strict_fork(); child == 0) {83 if ( pid_t child = strict_fork(); child == 0 ) { 89 84 int a, b, c; 90 85 array( cfa_option, 3 ) opts; … … 92 87 opts[1] = (cfa_option){'b', "BBBB", "", b }; 93 88 opts[2] = (cfa_option){'\0', "CC", "Third arg", c }; 94 print_args_usage(1, fake_argv, opts, "Test usage", false); 95 } 96 else { 97 int status = do_wait(child); 98 print_status(status); 99 } 89 print_args_usage(1, fake_argv, opts, "Test usage", false ); 90 } else { 91 int status = do_wait( child ); 92 print_status( status ); 93 } // if 100 94 101 95 sout | "Mix of short and long and some long description:"; 102 if (pid_t child = strict_fork(); child == 0) {96 if ( pid_t child = strict_fork(); child == 0 ) { 103 97 int a, b, c; 104 98 array( cfa_option, 3 ) opts; … … 106 100 opts[1] = (cfa_option){'b', "BBBB", "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", b }; 107 101 opts[2] = (cfa_option){'\0', "CC", "Third arg", c }; 108 print_args_usage(1, fake_argv, opts, "Test usage", false); 109 } 110 else { 111 int status = do_wait(child); 112 print_status(status); 113 } 102 print_args_usage(1, fake_argv, opts, "Test usage", false ); 103 } else { 104 int status = do_wait( child ); 105 print_status( status ); 106 } // if 114 107 } 115 108 116 109 // no used 117 static int true_main( const char * path, char * env[]) { return 0; }110 static int true_main( const char * path, char * env[]) { return 0; }
Note: See TracChangeset
for help on using the changeset viewer.