Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrommaiaa committed Jun 18, 2021
1 parent ccec338 commit 218e674
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ test2: flow tests/input21.flow lib/printint.c
./flow tests/input21.flow
gcc -o out out.s lib/printint.c
./out

test3: flow tests/test.flow lib/printint.c
./flow tests/test.flow
gcc -o out out.s lib/printint.c
./out
Binary file modified flow
Binary file not shown.
1 change: 1 addition & 0 deletions src/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static int scanch(void)
case 't': return '\t';
case 'v': return '\v';
case '"': return '"';
case '\\': return '\\';
case '\'': return '\'';
default: fatalc("Unknown escape sequence", c);
}
Expand Down
9 changes: 9 additions & 0 deletions tests/test.flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
char *str;

int main()
{
for (str = "Pedro Maia\n"; *str != 0; str = str + 1){
printchar(*str);
}
return(0);
}

0 comments on commit 218e674

Please sign in to comment.