zopencommunity / zopencommunity/bashport
new-exp.tests fails with string manipulation
Open
Nobody has claimed this yet.
bug
help wanted
- Dominant language
- Groovy
- Stars
- 12
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Running the test 'by hand' it seems to work ok, but running in the harness, it gets truncated.
The particular failing test is in new-exp8.sub:
declare z="start"
declare NUM=1000
pat1='str'
export LINE_MAX=100
#----------------------------------
# create a long string with ';'
#----------------------------------
for ((i=0; i<$NUM; i++)); do
z="$z;string$i"
done
#z="$z;string;foo"
#------------------------------
# delete everything except ';'
#------------------------------
# try different patterns here
x="${z//$pat1}"
echo $x
The string being echo'ed is getting truncated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the failing test in new-exp8.sub and compare its behavior when run by hand with its behavior in the new-exp.tests harness. Trace how the generated long string is passed to the harness and determine why the echoed value is truncated; done means the test completes without truncating the string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100