## Test file for generation filesystem integration
import src/nimpak/generation_filesystem
import std/[os, times]

# Test basic functionality
echo "=== Testing Generation Filesystem Integration ==="

# Create a test generation manager
var gm = newGenerationManager(
  programsRoot = "/tmp/test/Programs",
  indexRoot = "/tmp/test/Index",
  generationsRoot = "/tmp/test/Generations",
  dryRun = true  # Use dry run for testing
)

echo "✅ Created GenerationManager"

# Test loading current generation (should handle missing gracefully)
let loadResult = gm.loadCurrentGeneration()
echo "✅ Load current generation: ", loadResult

# Test creating a generation
let createResult = gm.createGeneration("gen-test-001", @["htop", "vim", "git"])
echo "✅ Create generation: ", createResult

# Test listing generations
let generations = gm.listGenerations()
echo "✅ List generations: ", generations.len, " found"

# Test generation info
gm.printGenerationStatus()

echo "=== Test completed successfully ==="