Skip to content

Commit 09af81c

Browse files
committed
tested funcs list: make grep search whole words
1 parent c9cf286 commit 09af81c

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

examples/debugging/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include <assert.h>
77
#include <debug.h>
88

9+
/* Even though in debug.h there are prototypes for SetWriteWatchpoint, SetWatchpoint, RemoveWatchpoint... you have to use the dbg_ prefix */
10+
911
void main(void) {
1012
/* Set the intial value of some variables */
1113
int dbg_test_var_1 = 10;

tools/funcs_tested/gen_list.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ files="src/fileioc/fileioc.h src/graphx/graphx.h src/keypadc/keypadc.h src/ce/ti
1717
# The destination markdown file
1818
outfile=$DIR/tested-functions-list.md
1919

20-
echo "## List of tested functions" > $outfile
21-
20+
# Find once the example sources we'll be searching in
2221
exampleFiles=$(find ./examples -type f \( -iname '*.c' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.hpp' -o -iname '*.asm' \))
2322

23+
echo "## List of tested functions" > $outfile
24+
2425
for f in $files
2526
do
2627
echo -e "\n### $f" >> $outfile
2728
echo -e "| Function | Tested? | Search link |" >> $outfile
2829
echo -e "| -------- | ------- | ----------- |" >> $outfile
2930

30-
# This will produce a list of funcName:funcLine, which we'll parse i nthe for loop below.
31+
# This will produce a list of funcName:funcLine, which we'll parse in the for loop below.
3132
filefuncts=$(ctags -u --fields=n --c-kinds=p --output-format=json $f | sed -e 's/.*"name": "\(.*\)", "path.*"line": \(.*\)}/\1:\2/g')
3233
totalFuncs=0
3334
totalTested=0
@@ -36,7 +37,7 @@ do
3637
((totalFuncs++))
3738
func=${funcAndLine%:*}
3839
line=${funcAndLine##*:}
39-
count=$(grep -l "$func" ${exampleFiles} | wc -l | awk '{print $1}')
40+
count=$(grep -l "\b${func}\b" ${exampleFiles} | wc -l | awk '{print $1}')
4041
if [[ "$count" == "0" ]]
4142
then
4243
foundStr=""

tools/funcs_tested/tested-functions-list.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
| Function | Tested? | Search link |
55
| -------- | ------- | ----------- |
66
| [`ti_CloseAll`](/src/fileioc/fileioc.h#L47) | YES (x5) | [occurrences](https://github.com/search?q=ti_CloseAll+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
7-
| [`ti_Open`](/src/fileioc/fileioc.h#L64) | YES (x4) | [occurrences](https://github.com/search?q=ti_Open+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
7+
| [`ti_Open`](/src/fileioc/fileioc.h#L64) | YES (x3) | [occurrences](https://github.com/search?q=ti_Open+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
88
| [`ti_OpenVar`](/src/fileioc/fileioc.h#L82) | YES (x1) | [occurrences](https://github.com/search?q=ti_OpenVar+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
9-
| [`ti_Close`](/src/fileioc/fileioc.h#L88) | YES (x5) | [occurrences](https://github.com/search?q=ti_Close+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
9+
| [`ti_Close`](/src/fileioc/fileioc.h#L88) | |
1010
| [`ti_Detect`](/src/fileioc/fileioc.h#L107) | YES (x1) | [occurrences](https://github.com/search?q=ti_Detect+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
1111
| [`ti_DetectVar`](/src/fileioc/fileioc.h#L127) ||
1212
| [`ti_Write`](/src/fileioc/fileioc.h#L138) | YES (x1) | [occurrences](https://github.com/search?q=ti_Write+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
@@ -33,7 +33,7 @@
3333
| [`ti_AllocCplxList`](/src/fileioc/fileioc.h#L354) ||
3434
| [`ti_AllocEqu`](/src/fileioc/fileioc.h#L355) ||
3535

36-
**Total: 13/29 tested.**
36+
**Total: 12/29 tested.**
3737

3838
### src/graphx/graphx.h
3939
| Function | Tested? | Search link |
@@ -64,7 +64,7 @@
6464
| [`gfx_VertLine_NoClip`](/src/graphx/graphx.h#L580) ||
6565
| [`gfx_Rectangle`](/src/graphx/graphx.h#L591) | YES (x2) | [occurrences](https://github.com/search?q=gfx_Rectangle+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
6666
| [`gfx_Rectangle_NoClip`](/src/graphx/graphx.h#L602) ||
67-
| [`gfx_FillRectangle`](/src/graphx/graphx.h#L613) | YES (x6) | [occurrences](https://github.com/search?q=gfx_FillRectangle+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
67+
| [`gfx_FillRectangle`](/src/graphx/graphx.h#L613) | YES (x4) | [occurrences](https://github.com/search?q=gfx_FillRectangle+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
6868
| [`gfx_FillRectangle_NoClip`](/src/graphx/graphx.h#L624) | YES (x2) | [occurrences](https://github.com/search?q=gfx_FillRectangle_NoClip+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
6969
| [`gfx_Circle`](/src/graphx/graphx.h#L634) | YES (x1) | [occurrences](https://github.com/search?q=gfx_Circle+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
7070
| [`gfx_FillCircle`](/src/graphx/graphx.h#L644) | YES (x1) | [occurrences](https://github.com/search?q=gfx_FillCircle+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
@@ -73,17 +73,17 @@
7373
| [`gfx_Polygon_NoClip`](/src/graphx/graphx.h#L701) ||
7474
| [`gfx_FillTriangle`](/src/graphx/graphx.h#L714) | YES (x1) | [occurrences](https://github.com/search?q=gfx_FillTriangle+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
7575
| [`gfx_FillTriangle_NoClip`](/src/graphx/graphx.h#L715) ||
76-
| [`gfx_SetDraw`](/src/graphx/graphx.h#L723) | YES (x7) | [occurrences](https://github.com/search?q=gfx_SetDraw+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
76+
| [`gfx_SetDraw`](/src/graphx/graphx.h#L723) | |
7777
| [`gfx_GetDraw`](/src/graphx/graphx.h#L751) ||
7878
| [`gfx_SwapDraw`](/src/graphx/graphx.h#L758) | YES (x6) | [occurrences](https://github.com/search?q=gfx_SwapDraw+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
79-
| [`gfx_Blit`](/src/graphx/graphx.h#L767) | YES (x2) | [occurrences](https://github.com/search?q=gfx_Blit+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
79+
| [`gfx_Blit`](/src/graphx/graphx.h#L767) | |
8080
| [`gfx_BlitLines`](/src/graphx/graphx.h#L778) | YES (x1) | [occurrences](https://github.com/search?q=gfx_BlitLines+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
8181
| [`gfx_BlitRectangle`](/src/graphx/graphx.h#L791) | YES (x1) | [occurrences](https://github.com/search?q=gfx_BlitRectangle+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
8282
| [`gfx_SetTextScale`](/src/graphx/graphx.h#L812) | YES (x1) | [occurrences](https://github.com/search?q=gfx_SetTextScale+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
8383
| [`gfx_PrintChar`](/src/graphx/graphx.h#L821) ||
8484
| [`gfx_PrintInt`](/src/graphx/graphx.h#L833) ||
8585
| [`gfx_PrintUInt`](/src/graphx/graphx.h#L845) | YES (x3) | [occurrences](https://github.com/search?q=gfx_PrintUInt+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
86-
| [`gfx_PrintString`](/src/graphx/graphx.h#L854) | YES (x5) | [occurrences](https://github.com/search?q=gfx_PrintString+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
86+
| [`gfx_PrintString`](/src/graphx/graphx.h#L854) | YES (x3) | [occurrences](https://github.com/search?q=gfx_PrintString+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
8787
| [`gfx_PrintStringXY`](/src/graphx/graphx.h#L866) | YES (x5) | [occurrences](https://github.com/search?q=gfx_PrintStringXY+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
8888
| [`gfx_GetTextX`](/src/graphx/graphx.h#L871) ||
8989
| [`gfx_GetTextY`](/src/graphx/graphx.h#L876) ||
@@ -92,11 +92,11 @@
9292
| [`gfx_SetTextFGColor`](/src/graphx/graphx.h#L910) | YES (x3) | [occurrences](https://github.com/search?q=gfx_SetTextFGColor+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
9393
| [`gfx_SetTextBGColor`](/src/graphx/graphx.h#L919) | YES (x2) | [occurrences](https://github.com/search?q=gfx_SetTextBGColor+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
9494
| [`gfx_SetTextTransparentColor`](/src/graphx/graphx.h#L928) | YES (x2) | [occurrences](https://github.com/search?q=gfx_SetTextTransparentColor+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
95-
| [`gfx_Sprite`](/src/graphx/graphx.h#L937) | YES (x6) | [occurrences](https://github.com/search?q=gfx_Sprite+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
95+
| [`gfx_Sprite`](/src/graphx/graphx.h#L937) | YES (x5) | [occurrences](https://github.com/search?q=gfx_Sprite+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
9696
| [`gfx_Sprite_NoClip`](/src/graphx/graphx.h#L946) | YES (x3) | [occurrences](https://github.com/search?q=gfx_Sprite_NoClip+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
97-
| [`gfx_TransparentSprite`](/src/graphx/graphx.h#L955) | YES (x3) | [occurrences](https://github.com/search?q=gfx_TransparentSprite+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
97+
| [`gfx_TransparentSprite`](/src/graphx/graphx.h#L955) | YES (x2) | [occurrences](https://github.com/search?q=gfx_TransparentSprite+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
9898
| [`gfx_TransparentSprite_NoClip`](/src/graphx/graphx.h#L964) | YES (x2) | [occurrences](https://github.com/search?q=gfx_TransparentSprite_NoClip+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
99-
| [`gfx_GetSprite`](/src/graphx/graphx.h#L976) | YES (x1) | [occurrences](https://github.com/search?q=gfx_GetSprite+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
99+
| [`gfx_GetSprite`](/src/graphx/graphx.h#L976) | |
100100
| [`gfx_ScaledSprite_NoClip`](/src/graphx/graphx.h#L1002) | YES (x1) | [occurrences](https://github.com/search?q=gfx_ScaledSprite_NoClip+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
101101
| [`gfx_ScaledTransparentSprite_NoClip`](/src/graphx/graphx.h#L1015) | YES (x1) | [occurrences](https://github.com/search?q=gfx_ScaledTransparentSprite_NoClip+repo%3ACE-Programming%2Ftoolchain+path%3Aexamples&type=Code)
102102
| [`gfx_RotatedScaledTransparentSprite_NoClip`](/src/graphx/graphx.h#L1030) ||
@@ -131,7 +131,7 @@
131131
| [`gfx_ConvertToNewRLETSprite`](/src/graphx/graphx.h#L1382) ||
132132
| [`gfx_LZDecompress`](/src/graphx/graphx.h#L1440) ||
133133

134-
**Total: 54/92 tested.**
134+
**Total: 51/92 tested.**
135135

136136
### src/keypadc/keypadc.h
137137
| Function | Tested? | Search link |

0 commit comments

Comments
 (0)