Commit 4590da1
committed
Remove double spaces from between test tags
I think these were introduced in the preceding commit due to trailing
spaces on end of lines before this PR. Python script for the update -
```
import os
import sys
from pathlib import Path
def usage():
print("Usage " + sys.argv[0] + " [directory]")
print("Processes all test tags within a [directory].")
def update_file(file_path) -> bool:
with file_path.open("rt") as file:
lines = file.readlines()
if len(lines) == 0:
print("File " + file_path + " is empty")
return False
if " " not in lines[0]:
return False
lines[0] = lines[0].replace(" ", " ")
with file_path.open("wt") as file:
file.writelines(lines)
return True
def main() -> int:
if len(sys.argv) != 2:
usage()
return os.EX_USAGE
directory = Path(sys.argv[1])
if not directory.is_absolute():
directory = Path(os.getcwd()) / directory
print("Running against directory " + os.fspath(directory))
if not directory.is_dir():
print("Error - This is not a directory.")
return os.EX_IOERR
files = directory.glob("*/*.desc")
tests_updated = 0
for file_path in files:
if not file_path.is_file():
print(os.fspath(file_path) + " was expected to be a file "
"but is not a file")
continue
if update_file(file_path):
tests_updated += 1
if tests_updated == 0:
print("Error - No tests updated")
return os.EX_NOTFOUND
print(str(tests_updated) + " tests updated.")
return os.EX_OK
if __name__ == '__main__':
sys.exit(main())
```1 parent 4452558 commit 4590da1
File tree
4 files changed
+4
-4
lines changed- regression/cbmc
- sat-solver-warning
- sat-solver
- simplify_singleton_interval_7690
4 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments