Here is the input file

setup:  The input file is copied as the following files (all identical):

a1btest_test.cpp, a1btest_test.c, a1btest_test.h,a1btest_test.txt, a1btest_test.ini, 'a1btest_test.t t'

2 subdirectories are made:

a1btest_subdir1, a1btest_subdir2

Under each, a1btest_test.cpp is copied into it:

a1btest_subdir1/a1btest_test.cpp

a1btest_subdir2/a1btest_test.cpp


For each of the test cases below, .../ means the full path leading up to the spot where the test is being run.  To get the mark, you had to get the correct files and line numbers.

Test #1:
===============

findcode Findcode

answer:

.../a1btest_test.cpp,1,//This is a test for Findcode.cpp
.../a1btest_test.cpp,9, //findcode
.../a1btest_test.c,1,//This is a test for Findcode.cpp
.../a1btest_test.c,9, //findcode
.../a1btest_test.h,1,//This is a test for Findcode.cpp
.../a1btest_test.h,9, //findcode
6 occurrences were found



Test #2
===============

findcode -c Findcode

answer:


.../a1btest_test.cpp,1,//This is a test for Findcode.cpp
.../a1btest_test.c,1,//This is a test for Findcode.cpp
.../a1btest_test.h,1,//This is a test for Findcode.cpp
3 occurrences were found


Test #3
===============

findcode -f a1btest_test.txt Findcode

answer:

.../a1btest_test.txt,1,//This is a test for Findcode.cpp
.../a1btest_test.txt,9, //findcode
2 occurrences were found

Test #4
==============

findcode -f a1btest_subdir1 functionality

answer

.../a1btest_subdir1/a1btest_test.cpp,8, //not even compile. It's here purely to test the functionality of
1 occurrences were found

Test #5
==============

findcode -e '{.txt;.ini}' functionality

answer

.../a1btest_test.txt,8, //not even compile. It's here purely to test the functionality of
.../a1btest_test.ini,8, //not even compile. It's here purely to test the functionality of
2 occurrences were found

Test #6
===============

findcode -e '{ t}' functionality

answer:

.../a1btest_test.t t,8, //not even compile. It's here purely to test the functionality of
1 occurrences were found

Test #7
===============

findcode -r functionality

answer:


.../a1btest_test.cpp,8, //not even compile. It's here purely to test the functionality of
.../a1btest_test.c,8, //not even compile. It's here purely to test the functionality of
.../a1btest_test.h,8, //not even compile. It's here purely to test the functionality of
.../a1btest_subdir1/a1btest_test.cpp,8, //not even compile. It's here purely to test the functionality of
.../a1btest_subdir2/a1btest_test.cpp,8, //not even compile. It's here purely to test the functionality of
5 occurrences were found


Test #8
===============

findcode -w find

answer:


.../a1btest_test.cpp,3,#include <find.h>
.../a1btest_test.cpp,10, int find;
.../a1btest_test.cpp,11, find();
.../a1btest_test.cpp,12, a->find;
.../a1btest_test.cpp,14, x= y*find;
.../a1btest_test.cpp,17,void func(void) {find;};
.../a1btest_test.cpp,21, c=!find+2;
.../a1btest_test.c,3,#include <find.h>
.../a1btest_test.c,10, int find;
.../a1btest_test.c,11, find();
.../a1btest_test.c,12, a->find;
.../a1btest_test.c,14, x= y*find;
.../a1btest_test.c,17,void func(void) {find;};
.../a1btest_test.c,21, c=!find+2;
.../a1btest_test.h,3,#include <find.h>
.../a1btest_test.h,10, int find;
.../a1btest_test.h,11, find();
.../a1btest_test.h,12, a->find;
.../a1btest_test.h,14, x= y*find;
.../a1btest_test.h,17,void func(void) {find;};
.../a1btest_test.h,21, c=!find+2;
21 occurrences were found


Test #9
=========

findcode -e '{.txt' find

answer:

Error: Invalid extension


Test #10
========
findcode -f noexistfile blah

answer:

Error: entry doesn't exist: noexistfile