Skip to content

Commit

Permalink
Add an application test
Browse files Browse the repository at this point in the history
This new test runs the app as the user would with a bit of configuration
  • Loading branch information
Farigh committed Dec 1, 2023
1 parent 11f77a8 commit 332cfac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ jobs:
- name: Run NSIQCppStyle RULES tests
timeout-minutes: 5
run: PYTHONPATH=./:./rules python -m unittest discover -s rules -p "*.py"

- name: Run NSIQCppStyle App tests
timeout-minutes: 5
run: python nsiqcppstyle_exe.py -f nsiqunittest/resx/filefilter.example.txt --ci nsiqunittest/resx/example.cpp
4 changes: 4 additions & 0 deletions nsiqunittest/resx/example.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int main(int argc, char* argv[])
{
return 1;
}
11 changes: 11 additions & 0 deletions nsiqunittest/resx/filefilter.example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This filefilter is here to ensure that the app:
# - handles comments properly
# - handles empty lines correctly

~ RULE_3_1_A_do_not_start_filename_with_underbar
~ RULE_3_3_A_start_function_name_with_lowercase_unix
~ RULE_3_3_B_start_private_function_name_with_underbar
~ RULE_4_5_B_use_braces_even_for_one_statement
~ RULE_7_2_B_do_not_use_goto_statement
~ RULE_9_1_A_do_not_use_hardcorded_include_path
~ RULE_9_2_D_use_reentrant_function

0 comments on commit 332cfac

Please sign in to comment.