forked from korsakov/ohcount
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added basic unit tests for Prolog parsing.
- Loading branch information
Showing
7 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/perl | ||
print "Hello, world!\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
# Also a Perl file but without the shebang line | ||
print "Hello, world!\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
% select(Element, List, Remaining) | ||
|
||
select(H, [H| T], T). | ||
select(H, [X| R], [X| T]) :- | ||
select(H, R, T). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
prolog comment /* test file for Prolog parsing */ | ||
prolog blank | ||
prolog comment % this is a Prolog source file | ||
prolog blank | ||
prolog comment % select(Element, List, Remaining) | ||
prolog blank | ||
prolog code select(H, [H| T], T). | ||
prolog code select(H, [X| R], [X| T]) :- | ||
prolog code select(H, R, T). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* test file for Prolog parsing */ | ||
|
||
% this is a Prolog source file | ||
|
||
% select(Element, List, Remaining) | ||
|
||
select(H, [H| T], T). | ||
select(H, [X| R], [X| T]) :- | ||
select(H, R, T). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters