]> www.git.momoyon.org Git - lang.git/commitdiff
[test.py] Iterate over the files in alphabetical order.
authorahmedsamyh <ahmedsamyh10@gmail.com>
Sat, 16 Nov 2024 17:51:43 +0000 (22:51 +0500)
committerahmedsamyh <ahmedsamyh10@gmail.com>
Sat, 16 Nov 2024 17:51:43 +0000 (22:51 +0500)
test.py

diff --git a/test.py b/test.py
index 3582442c2dae2eaeef11df31c1312a5749141d44..3824c08838bb886bb51cf5623a5a662036f55d05 100644 (file)
--- a/test.py
+++ b/test.py
@@ -65,7 +65,20 @@ def test_source_file(filename: str):
 
 def main():
 
+    # arr = [
+    #     './tests/01-unterminated-string.momo',
+    #     './tests/06-single-char-symbols.momo',
+    #     './tests/04-identifier.momo',
+    #     './tests/05-multiple-identifiers.momo',
+    #     './tests/02-string.momo',
+    #     './tests/03-whitespaced-string.momo',
+    # ]
+    # arr = sorted(arr)
+
+    # print(arr)
+
     for (dirpath, dirs, files) in os.walk(TESTS_DIR):
+        files = sorted(files)
         for f in files:
             if f.endswith(MOMO_FILE_SUFFIX):
                 test_source_file(TESTS_DIR + f)