forked from Github/Axter-Stash
Adding test scripts used for self unit testing.
This commit is contained in:
1
plugins/.gitignore
vendored
1
plugins/.gitignore
vendored
@@ -34,7 +34,6 @@ renamefile_settings.cpython-310.pyc
|
||||
/DeleteMe
|
||||
/ATestPlugin
|
||||
/FileMonitor/working
|
||||
test_hello_world*.*
|
||||
MyDummyFileFrom_test_script_hello_world.txt
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
|
||||
6
plugins/FileMonitor/test_hello_world.bat
Normal file
6
plugins/FileMonitor/test_hello_world.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
@ECHO OFF
|
||||
echo Hello, world from batch script! arg = %*
|
||||
|
||||
echo Hello, world from batch script! arg = %* > %~dp0\\MyDummyFileFromBatchTestFor_FileMonitor.txt
|
||||
|
||||
exit /b 0
|
||||
14
plugins/FileMonitor/test_hello_world.py
Normal file
14
plugins/FileMonitor/test_hello_world.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import sys, os, pathlib, json
|
||||
|
||||
Args = ""
|
||||
if len(sys.argv) > 1:
|
||||
Args = sys.argv[1:]
|
||||
print(f"StdErr: Hello, world from Python script!\nArgs={Args}", file=sys.stderr)
|
||||
|
||||
testFileToCreate = f"{pathlib.Path(__file__).resolve().parent}{os.sep}MyDummyFileFromPython_{pathlib.Path(__file__).stem}.txt"
|
||||
|
||||
pathlib.Path(testFileToCreate).touch()
|
||||
|
||||
print(f"Hello, world from Python script!\nArgs={Args}")
|
||||
|
||||
sys.exit(0)
|
||||
6
plugins/FileMonitor/test_hello_world2.cmd
Normal file
6
plugins/FileMonitor/test_hello_world2.cmd
Normal file
@@ -0,0 +1,6 @@
|
||||
@ECHO OFF
|
||||
echo Hello, world#2 from batch script! arg = %*
|
||||
|
||||
echo Hello, world#2 from batch script! arg = %* > %~dp0\\MyDummyFileFromBatch2TestFor_FileMonitor.txt
|
||||
|
||||
exit /b 0
|
||||
14
plugins/FileMonitor/test_hello_world2.py
Normal file
14
plugins/FileMonitor/test_hello_world2.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import sys, os, pathlib, json
|
||||
|
||||
Args = ""
|
||||
if len(sys.argv) > 1:
|
||||
Args = sys.argv[1:]
|
||||
print(f"StdErr: Hello, world from Python script!\nArgs={Args}", file=sys.stderr)
|
||||
|
||||
testFileToCreate = f"{pathlib.Path(__file__).resolve().parent}{os.sep}MyDummyFileFromPython2_{pathlib.Path(__file__).stem}.txt"
|
||||
|
||||
pathlib.Path(testFileToCreate).touch()
|
||||
|
||||
print(f"Hello, world from Python script2!\nArgs={Args}")
|
||||
|
||||
sys.exit(0)
|
||||
Reference in New Issue
Block a user