Archive the Rust web plugin and add a Go c-shared skeleton with ABI v2 bridge, build script, design doc/ADR, and smoke test so multi-language plugins and full web parity can proceed wave by wave. Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
580 B
Go
30 lines
580 B
Go
package page_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/marqdo/marqdo/plugins/web/internal/page"
|
|
)
|
|
|
|
func TestNewDefaults(t *testing.T) {
|
|
p := page.New(map[string]any{})
|
|
if p["title"] != "Marqdo Web" {
|
|
t.Fatalf("title=%v", p["title"])
|
|
}
|
|
if p["intro"] != "" {
|
|
t.Fatalf("intro=%v", p["intro"])
|
|
}
|
|
}
|
|
|
|
func TestNewZhAliases(t *testing.T) {
|
|
p := page.New(map[string]any{
|
|
"title": "T",
|
|
"壳样式": "minimal",
|
|
"布局": "bare",
|
|
"资源版本": "v1",
|
|
})
|
|
if p["shell_css"] != "minimal" || p["layout"] != "bare" || p["asset_version"] != "v1" {
|
|
t.Fatalf("%v", p)
|
|
}
|
|
}
|