summaryrefslogtreecommitdiff
path: root/test/pecoff/resource.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/pecoff/resource.test')
-rw-r--r--test/pecoff/resource.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/pecoff/resource.test b/test/pecoff/resource.test
new file mode 100644
index 0000000000000..8cdc9a5bf83f1
--- /dev/null
+++ b/test/pecoff/resource.test
@@ -0,0 +1,16 @@
+# REQUIRES: winres
+
+# RUN: yaml2obj %p/Inputs/nop.obj.yaml > %t.obj
+
+# RUN: lld -flavor link /out:%t.exe /subsystem:console /entry:start /opt:noref \
+# RUN: -- %t.obj %p/Inputs/resource.res
+
+# Check if the binary contains UTF-16LE string "Hello" copied from resource.res.
+# RUN: cat %t.exe | grep 'H.e.l.l.o'
+
+# RUN: lld -flavor link /out:%t.exe /subsystem:console /entry:start /opt:noref \
+# RUN: /manifest:embed -- %t.obj %p/Inputs/resource.res
+# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
+
+CHECK: ResourceTableRVA: 0x1000
+CHECK: ResourceTableSize: 0x208