testsuite: Add some make test cases.
This commit is contained in:
parent
fff412b2f2
commit
d48d9ebd2f
16
test/fixtures/make/Makefile
vendored
Normal file
16
test/fixtures/make/Makefile
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
NAME := sample
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(NAME)
|
||||||
|
|
||||||
|
$(NAME): sample.c
|
||||||
|
cc -o $@ $^
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
|
install: all
|
||||||
|
mkdir -p /usr/bin
|
||||||
|
install -m 755 $(NAME) /usr/bin
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
-rm -f $(NAME)
|
0
test/fixtures/make/empty_dir/.nothing_here
vendored
Normal file
0
test/fixtures/make/empty_dir/.nothing_here
vendored
Normal file
7
test/fixtures/make/sample.c
vendored
Normal file
7
test/fixtures/make/sample.c
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
puts("Hello, world!");
|
||||||
|
return 0;
|
||||||
|
}
|
@ -4,14 +4,33 @@ proc setup {} {
|
|||||||
|
|
||||||
|
|
||||||
proc teardown {} {
|
proc teardown {} {
|
||||||
assert_env_unmodified
|
assert_env_unmodified {/OLDPWD=/d}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setup
|
setup
|
||||||
|
|
||||||
|
|
||||||
assert_complete_any "make "
|
set test "-f Ma<TAB> should complete \"Makefile\""
|
||||||
|
set dir $::srcdir/fixtures/make
|
||||||
|
assert_complete_dir "Makefile" "make -f Ma" $dir $test
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
set test "\"make <TAB>\" should complete targets"
|
||||||
|
set dir $::srcdir/fixtures/make
|
||||||
|
set targets "all sample install clean"
|
||||||
|
assert_complete_dir $targets "make " $dir $test
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
set test "\"make <TAB>\" should not show anything in directory without makefile"
|
||||||
|
set dir $::srcdir/fixtures/make/empty_dir
|
||||||
|
assert_complete_dir "" "make " $dir $test
|
||||||
|
|
||||||
|
|
||||||
sync_after_int
|
sync_after_int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user