package omp_test

import (
	"goids/pkg/types/omp"
	"testing"
)

const ompExample = `; OM File Header - Saved 2022/12/29 14:43:16
; (6.19 :patc (om-make-point 10 10) (om-make-point 50 50) (om-make-point 500 400) "" 183 0 "2022/12/29 14:43:16" "2022/12/29 14:43:16")
; End File Header
(in-package :om)(load-lib-for (quote nil))(setf *om-current-persistent* (om-load-patch1 "Test Patch" (quote nil) (quote nil) nil 6.19))`

func TestOmpBuilder(t *testing.T) {
	header := &omp.OMP{}
	header.Data.SetIntro()
	header.Data.SetLibFor()
	header.Data.SetOMCurrentPersistent("om-load-patch1", "Test Patch")
	header.Header.Init()
	str := string(header.Build())
	if str != ompExample {
		t.Errorf("Header is wrong\nwant:\n%s \n\ngot \n%s", ompExample, str)
	}

}
