test: Added tests for TOML support

This commit is contained in:
Alex Harris 2024-10-11 18:15:04 +01:00
parent 73fd4fae40
commit 220a09bb7c
3 changed files with 31 additions and 0 deletions

View File

@ -117,6 +117,18 @@ index 6397789..494d42f 100644
-# TODO: Define inputs
-# Need to do this before the action is released
-# labels: urgent
diff --git a/tests/example_file.toml b/tests/example_file.toml
index 6397789..494d42f 100644
--- a/tests/example_file.toml
+++ b/tests/example_file.toml
@@ -1,7 +1,3 @@
name = "TODO to Issue"
-# TODO: Write a more interesting description
description = "Converts IDE TODO comments to GitHub issues"
author = "Alastair Mooney"
-# TODO: Define inputs
-# Need to do this before the action is released
-# labels: urgent
diff --git a/tests/example_file.prog.abap b/tests/example_file.prog.abap
index 6397789..494d42f 100644
--- /dev/null

View File

@ -143,6 +143,19 @@ index 0000000..6397789
+# TODO: Define inputs
+# Need to do this before the action is released
+# labels: urgent
diff --git a/tests/example_file.toml b/tests/example_file.toml
new file mode 100644
index 0000000..6397789
--- /dev/null
+++ b/tests/example_file.toml
@@ -0,0 +1,7 @@
+name = "TODO to Issue"
+# TODO: Write a more interesting description
+description = "Converts IDE TODO comments to GitHub issues"
+author = "Alastair Mooney"
+# TODO: Define inputs
+# Need to do this before the action is released
+# labels: urgent
diff --git a/tests/example_file.prog.abap b/src/tests/example_file.prog.abap
new file mode 100644
index 0000000..7cccc5b

View File

@ -29,6 +29,9 @@ class NewIssueTest(unittest.TestCase):
def test_yaml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2)
def test_toml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'toml'), 2)
def test_php_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'php'), 4)
@ -120,6 +123,9 @@ class ClosedIssueTest(unittest.TestCase):
def test_yaml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2)
def test_toml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'toml'), 2)
def test_php_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'php'), 4)