docs: Add documentation for Git module tests
- Added documentation for the Git module's test scripts, including test structure, running instructions, and details of each test. - Added links to Git module tests in the main Rhai documentation. - Improved overall structure and clarity of the Rhai documentation.
This commit is contained in:
@@ -31,6 +31,8 @@ herodo --path path/to/script.rhai
|
||||
SAL includes test scripts for verifying the functionality of its Rhai integration. These tests are located in the `src/rhai_tests` directory and are organized by module.
|
||||
|
||||
- [OS Module Tests](os_module_tests.md): Tests for file system, download, and package management operations
|
||||
- [Git Module Tests](git_module_tests.md): Tests for Git repository management and operations
|
||||
- [Running Tests](running_tests.md): Instructions for running all Rhai tests
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -54,15 +56,15 @@ mkdir(test_dir);
|
||||
|
||||
if exist(test_dir) {
|
||||
print(`Directory ${test_dir} created successfully`);
|
||||
|
||||
|
||||
// Create a file
|
||||
let test_file = test_dir + "/test.txt";
|
||||
file_write(test_file, "Hello, world!");
|
||||
|
||||
|
||||
// Read the file
|
||||
let content = file_read(test_file);
|
||||
print(`File content: ${content}`);
|
||||
|
||||
|
||||
// Clean up
|
||||
delete(test_dir);
|
||||
}
|
||||
|
Reference in New Issue
Block a user