36 lines
935 B
Python
36 lines
935 B
Python
#!/usr/bin/env python3
|
||
"""
|
||
Simple test to verify Clover CLI components work correctly
|
||
"""
|
||
import sys
|
||
import os
|
||
|
||
# Test basic imports
|
||
try:
|
||
from tools.git_tools import git_status
|
||
from tools.lint_format_tools import lint_code
|
||
from tools.file_tools import create_file, read_file
|
||
print("<EFBFBD><EFBFBD><EFBFBD> All core modules imported successfully")
|
||
|
||
# Test simple git status
|
||
status = git_status()
|
||
print(f"<EFBFBD><EFBFBD><EFBFBD> Git status test: {type(status)} returned")
|
||
|
||
# Test file operations
|
||
create_file("test.txt", "Hello Clover!")
|
||
content = read_file("test.txt")
|
||
print(f"<EFBFBD><EFBFBD><EFBFBD> File operations work: {content}")
|
||
|
||
print("\n🎉 Clover installation is working correctly!")
|
||
print("You can now run: PYTHONPATH=. python main.py")
|
||
|
||
except Exception as e:
|
||
print(f"❌ Error during test: {e}")
|
||
sys.exit(1)
|
||
finally:
|
||
# Clean up test file
|
||
try:
|
||
os.remove("test.txt")
|
||
except:
|
||
pass
|