-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_fix.lua
More file actions
executable file
·54 lines (45 loc) · 1.44 KB
/
test_fix.lua
File metadata and controls
executable file
·54 lines (45 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env lua
-- test_fix.lua - Test that the module loading fix works
-- This script tests if all CodingBuddy modules can be loaded correctly
print("Testing CodingBuddy module loading fix...")
print("==========================================")
-- Change to codingbuddy directory
local original_path = package.path
package.path = './codingbuddy/?.lua;./codingbuddy/?/init.lua;' .. package.path
local modules_to_test = {
'utils',
'config',
'json',
'ai_connector',
'analyzer',
'dialogs',
'conversation_manager',
'chat_interface',
'main'
}
local success_count = 0
local total_count = #modules_to_test
for _, module_name in ipairs(modules_to_test) do
local ok, result = pcall(require, module_name)
if ok then
print("✓ " .. module_name .. " - loaded successfully")
success_count = success_count + 1
else
print("✗ " .. module_name .. " - failed to load: " .. tostring(result))
end
end
print("\nResults:")
print("========")
print("Successful: " .. success_count .. "/" .. total_count)
if success_count == total_count then
print("🎉 All modules loaded successfully!")
print("\nThe fix worked! You can now try CodingBuddy in Geany:")
print("1. Restart Geany")
print("2. Look for CodingBuddy options in Tools menu")
print("3. Try 'CodingBuddy: Open Chat'")
else
print("❌ Some modules failed to load.")
print("Please check the error messages above.")
end
-- Restore original path
package.path = original_path