compiler-script + return tests
This commit is contained in:
parent
70f6498bad
commit
39b3ee0664
|
@ -0,0 +1,10 @@
|
|||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* This program has the purpose of returning a -1 value, indicating the shell that something has gone wrong
|
||||
* while the program was running.
|
||||
*/
|
||||
|
||||
int main(){
|
||||
return -1;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* This program takes the given argument and returns it as an integer.
|
||||
* It might be useful to test a shell.
|
||||
*/
|
||||
|
||||
int main(int argc, char** argv){
|
||||
if(argc<2){
|
||||
printf("No argument given.\n");
|
||||
return -1;
|
||||
}
|
||||
return atoi(argv[1]);
|
||||
}
|
Loading…
Reference in New Issue