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

mpeterv / Penlight / 34
81%
master: 84%

Build:
Build:
LAST BUILD BRANCH: add-import-into-checks
DEFAULT BRANCH: master
Ran 17 Jul 2016 11:35AM UTC
Jobs 4
Files 39
Run time 22s
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
34

push

travis-ci

mpeterv
Fix path.normpath

Rewrite path.normpath to first split out path anchor
(drive or UNC path start or '/', '//' or '\') and then iterate
over parts of remaining relative path.

This fixes issues with normpath not working correctly (comparing
to Python's os.path.normpath) in these cases:

* When a path part starts with '..':
    os.path.normpath("A/..B") == "A/..B"
    pl.path.normpath("A/..B") == "B"
* When a path starts with './':
    os.path.normpath("./A") == "A"
    pl.path.normpath("./A") == "./A"
* When a path ends with '/.':
    os.path.normpath("A/.") == "A"
    pl.path.normpath("A/.") == "A/."
* When a path ends with '/':
    os.path.normpath("A/") == "A"
    pl.path.normpath("A/") == "A/"
* When a path starts with '//':
    os.path.normpath("//") == "//"
    pl.path.normpath("//") == "/"

After this commit the only category of mismatches with Python's normpath
is paths starting with '/..': Python collapses that to '/'.

On Windows this commit fixes "C:\.." being normalized to ".".
Fixes #184.

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

4414 of 5472 relevant lines covered (80.67%)

750.41 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
11
100.0
lua/pl/path.lua
Jobs
ID Job ID Ran Files Coverage
1 34.1 (LUA="lua 5.1") 17 Jul 2016 11:35AM UTC 0
79.73
Travis Job 34.1
2 34.2 (LUA="lua 5.2") 17 Jul 2016 11:35AM UTC 0
80.07
Travis Job 34.2
3 34.3 (LUA="lua 5.3") 17 Jul 2016 11:35AM UTC 0
80.14
Travis Job 34.3
4 34.4 (LUA="luajit 2.0") 17 Jul 2016 11:35AM UTC 0
79.48
Travis Job 34.4
Source Files on build 34
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #34
  • c4a7b4de on github
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

© 2026 Coveralls, Inc