• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

abs-lang / abs / 872
72%
master: 63%

Build:
Build:
LAST BUILD BRANCH: 2.8.x
DEFAULT BRANCH: master
Ran 25 Aug 2019 06:32PM UTC
Jobs 3
Files 7
Run time 5min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
872

push

travis-ci-com

odino
Negative indexes, closes #274

This PR adds support for negative indexes in arrays / strings.

``` bash
[1,2,3][-1] #3
```

There is one change that might alter existing ABS scripts, and that's
non-existing indexes, for strings, returning an empty string rather than
`null`.

I believe it's an ok thing to break as both will evaluate to `false`
when casted to boolean, and to check whether an index exists one can
simply:

* check the length of the string (`s.len()`)
* check the boolean value of the index (`!!s[idx]`)

both these examples do not break with these changes. I instead admit
that it would be weird to see code such as:

``` bash
if s[idx] == null {
  ...
}
```

rather than

```
if !s[idx] {
  ...
}
```

So I guess this is a change that can go through, as it really shouldn't
impact much of the userbase.

22 of 22 new or added lines in 1 file covered. (100.0%)

2739 of 3800 relevant lines covered (72.08%)

84.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 872.1 25 Aug 2019 06:37PM UTC 0
70.95
Travis Job 872.1
2 872.2 25 Aug 2019 06:32PM UTC 0
72.08
Travis Job 872.2
3 872.3 25 Aug 2019 06:33PM UTC 0
72.08
Travis Job 872.3
Source Files on build 872
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #872
  • 6ef88ffd on github
  • Prev Build on 1.8.x (#868)
  • Next Build on 1.8.x (#880)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc