-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
Adjust basic driver See merge request eng/toolchain/gnatcoll-core!170
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from e3.os.fs import touch | ||
from e3.fs import mkdir | ||
|
||
if __name__ == "__main__": | ||
mkdir("foo") | ||
mkdir("dir1") | ||
mkdir("dir2") | ||
touch("dir1/foo") | ||
touch("dir2/foo") | ||
touch("dir2/bar") | ||
touch("bar") | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
description: Extensive test for the GNATCOLL.File_Paths API | ||
driver: build_run_diff | ||
control: | ||
- [SKIP, "env.is_cross", "Tests using test.sh currently not supported on cross targets, see T616-039"] |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
content = sys.stdin.read().splitlines() | ||
# Confirm that when permitted, the help text can exceed the previous 80 | ||
# character limit without wrapping. | ||
for line in content: | ||
if len(line) > 80: | ||
print("<=== TEST PASSED ===>") | ||
sys.exit(0) | ||
print("there should be at least one line with more than 80 characters") | ||
sys.exit(1) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
with Mylib; | ||
|
||
procedure Test is | ||
function Test return Integer is | ||
begin | ||
Mylib.Run; | ||
return 0; | ||
end Test; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
content = sys.stdin.read().splitlines() | ||
for line in content: | ||
assert len(line) <= 80, f"line too long:{line}" | ||
print("<=== TEST PASSED ===>") | ||
sys.exit(0) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
with Mylib; | ||
|
||
procedure Test is | ||
function Test return Integer is | ||
begin | ||
Mylib.Run; | ||
return 0; | ||
end Test; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
content = sys.stdin.read() | ||
# Opposite to help_short_80. There should be more than 20 spaces, which | ||
# was the previous limit after a single character arg like "-c" and a | ||
# fixed 25 character column | ||
assert " " * 20 in content, "at least 20 spaces expected" | ||
print("<=== TEST PASSED ===>") | ||
sys.exit(0) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
with Mylib; | ||
|
||
procedure Test is | ||
function Test return Integer is | ||
begin | ||
Mylib.Run; | ||
return 0; | ||
end Test; |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
driver: build_run_diff | ||
description: Check that long argument name causes the previously default 25 column limit to expand | ||
run_args: | ||
- ["--help"] | ||
control: | ||
- [SKIP, "env.is_cross", "Tests using test.sh currently not supported on cross targets, see T616-039"] | ||
- [XFAIL, "env.llvm", "partial linking not supported in lld eng/gpr/gpr-issues#428"] |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
STDOUT=stdout.log | ||
#!/usr/bin/env python3 | ||
import sys | ||
|
||
./test --help > $STDOUT | ||
|
||
# Check that the help message is structured as expected | ||
if ! grep -q -P "( ){4,}" $STDOUT; then | ||
if __name__ == "__main__": | ||
content = sys.stdin.read() | ||
# The biggest whitespace should be the three characters before optional | ||
# arguments as "--help, -h" and "--char, -C" are the same lenght, and | ||
# while they are less than 25 characters, the column number the help | ||
# text starts at should be limited to 2 after the longest arg text. | ||
echo "Help message column reduced as expected" | ||
fi | ||
assert " " not in content, "no more than 3 consecutive whitespaces expected" | ||
print("<=== TEST PASSED ===>") | ||
sys.exit(0) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
with Mylib; | ||
|
||
procedure Test is | ||
function Test return Integer is | ||
begin | ||
Mylib.Run; | ||
return 0; | ||
end Test; |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
driver: build_run_diff | ||
description: Check that long argument name causes the previously default 25 column limit to shrink | ||
run_args: | ||
- ["--help"] | ||
control: | ||
- [SKIP, "env.is_cross", "Tests using test.sh currently not supported on cross targets, see T616-039"] | ||
- [XFAIL, "env.llvm", "partial linking not supported in lld eng/gpr/gpr-issues#428"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ package body Mylib is | |
((1 => GNATCOLL.Strings.To_XString ("--help"))); | ||
begin | ||
null; | ||
end; | ||
end Run; | ||
|
||
end Mylib; |
This file was deleted.
This file was deleted.