mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Test gas file
This commit is contained in:
3
test/fixtures/blob/hello.c
vendored
3
test/fixtures/blob/hello.c
vendored
@@ -1,6 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
void main()
|
int main()
|
||||||
{
|
{
|
||||||
printf("Hello World\n");
|
printf("Hello World\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
63
test/fixtures/blob/hello.s
vendored
Normal file
63
test/fixtures/blob/hello.s
vendored
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
.cstring
|
||||||
|
LC0:
|
||||||
|
.ascii "Hello World\0"
|
||||||
|
.text
|
||||||
|
.globl _main
|
||||||
|
_main:
|
||||||
|
LFB3:
|
||||||
|
pushq %rbp
|
||||||
|
LCFI0:
|
||||||
|
movq %rsp, %rbp
|
||||||
|
LCFI1:
|
||||||
|
leaq LC0(%rip), %rdi
|
||||||
|
call _puts
|
||||||
|
movl $0, %eax
|
||||||
|
leave
|
||||||
|
ret
|
||||||
|
LFE3:
|
||||||
|
.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
|
||||||
|
EH_frame1:
|
||||||
|
.set L$set$0,LECIE1-LSCIE1
|
||||||
|
.long L$set$0
|
||||||
|
LSCIE1:
|
||||||
|
.long 0x0
|
||||||
|
.byte 0x1
|
||||||
|
.ascii "zR\0"
|
||||||
|
.byte 0x1
|
||||||
|
.byte 0x78
|
||||||
|
.byte 0x10
|
||||||
|
.byte 0x1
|
||||||
|
.byte 0x10
|
||||||
|
.byte 0xc
|
||||||
|
.byte 0x7
|
||||||
|
.byte 0x8
|
||||||
|
.byte 0x90
|
||||||
|
.byte 0x1
|
||||||
|
.align 3
|
||||||
|
LECIE1:
|
||||||
|
.globl _main.eh
|
||||||
|
_main.eh:
|
||||||
|
LSFDE1:
|
||||||
|
.set L$set$1,LEFDE1-LASFDE1
|
||||||
|
.long L$set$1
|
||||||
|
LASFDE1:
|
||||||
|
.long LASFDE1-EH_frame1
|
||||||
|
.quad LFB3-.
|
||||||
|
.set L$set$2,LFE3-LFB3
|
||||||
|
.quad L$set$2
|
||||||
|
.byte 0x0
|
||||||
|
.byte 0x4
|
||||||
|
.set L$set$3,LCFI0-LFB3
|
||||||
|
.long L$set$3
|
||||||
|
.byte 0xe
|
||||||
|
.byte 0x10
|
||||||
|
.byte 0x86
|
||||||
|
.byte 0x2
|
||||||
|
.byte 0x4
|
||||||
|
.set L$set$4,LCFI1-LCFI0
|
||||||
|
.long L$set$4
|
||||||
|
.byte 0xd
|
||||||
|
.byte 0x6
|
||||||
|
.align 3
|
||||||
|
LEFDE1:
|
||||||
|
.subsections_via_symbols
|
||||||
@@ -194,6 +194,7 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
assert_equal Language['Objective-C'], blob("Foo.h").language
|
assert_equal Language['Objective-C'], blob("Foo.h").language
|
||||||
assert_equal Language['Objective-C'], blob("FooAppDelegate.m").language
|
assert_equal Language['Objective-C'], blob("FooAppDelegate.m").language
|
||||||
assert_equal Language['Objective-C'], blob("FooAppDelegate.h").language
|
assert_equal Language['Objective-C'], blob("FooAppDelegate.h").language
|
||||||
|
assert_equal Language['GAS'], blob("hello.s").language
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_lexer
|
def test_lexer
|
||||||
|
|||||||
Reference in New Issue
Block a user