Skip to content

Commit 95c99a7

Browse files
committed
test - add a simple test to avoid future problems
1 parent 50ec9b9 commit 95c99a7

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Checking init.lua defines codepage stuff on windows
3+
format: native
4+
_quarto:
5+
tests:
6+
native: default
7+
filters:
8+
- at: pre-ast
9+
path: check-init.lua
10+
---
11+
12+
This document only serve to run the Lua filter to check init.lua correctly applies on Windows
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Meta = function(m)
2+
if (pandoc.system.os == "mingw32") then
3+
-- IMPORTANT: This is only valid on windows
4+
assert(_G.convert_from_utf8, "Required function 'convert_from_utf8' is missing from global scope on Windows. Something may be wrong with 'init.lua'")
5+
else
6+
assert(not _G.convert_from_utf8, "Function 'convert_from_utf8' is in global scope on non-Windows. Something may be wrong with 'init.lua'")
7+
end
8+
return m
9+
end

0 commit comments

Comments
 (0)