2025-01-12 21:09:12 +03:00
|
|
|
module main
|
|
|
|
|
|
|
|
import os
|
|
|
|
import v.util.diff
|
|
|
|
import embedfs
|
|
|
|
|
|
|
|
fn test_mymod() {
|
|
|
|
expected_out := os.read_file('tests/mymod_test.out')!
|
|
|
|
os.chdir('tests/mymod')!
|
|
|
|
gen := embedfs.CodeGenerator{
|
|
|
|
path: 'assets'
|
|
|
|
make_pub: false
|
|
|
|
}
|
|
|
|
os.write_file('assets_generated.v', gen.generate())!
|
2025-01-13 20:58:30 +03:00
|
|
|
ret := os.execute('${os.quoted_path(@VEXE)} run .')
|
2025-01-12 21:09:12 +03:00
|
|
|
dump(diff.compare_text(ret.output, expected_out)!)
|
|
|
|
assert ret.output == expected_out
|
|
|
|
}
|