25 lines
888 B
PowerShell
25 lines
888 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
function Assert-True {
|
|
param(
|
|
[bool]$Condition,
|
|
[string]$Message
|
|
)
|
|
if (-not $Condition) { throw $Message }
|
|
}
|
|
|
|
Assert-True (Test-Path 'templates/navbar.php') 'Missing templates/navbar.php'
|
|
$navbar = Get-Content -Raw 'templates/navbar.php'
|
|
Assert-True ($navbar -match 'mobile-menu-toggle') 'Navbar missing toggle id'
|
|
Assert-True ($navbar -match 'nav-link-active') 'Navbar missing active class'
|
|
|
|
Assert-True (Test-Path 'assets/js/main.js') 'Missing assets/js/main.js'
|
|
$js = Get-Content -Raw 'assets/js/main.js'
|
|
Assert-True ($js -match 'initMobileMenu') 'Missing initMobileMenu'
|
|
Assert-True ($js -match 'initNavbarScroll') 'Missing initNavbarScroll'
|
|
|
|
Assert-True (Test-Path 'index.php') 'Missing index.php'
|
|
$index = Get-Content -Raw 'index.php'
|
|
Assert-True ($index -match "include_template\('navbar'") 'index.php missing navbar include'
|
|
|
|
'OK' |