Skip to content

Commit

Permalink
Update docs and travis
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Dec 31, 2015
1 parent b7aa498 commit a9b0160
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Expand Up @@ -11,4 +11,11 @@ matrix:
- d: dmd-2.065.0
- d: gdc-4.8.2
- d: ldc-0.14.0


install:
- wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.1.6/doveralls_linux_travis"
- chmod +x doveralls

script:
- dub test -b unittest-cov --compiler=${DC}
- ./doveralls
24 changes: 17 additions & 7 deletions source/icontheme.d
@@ -1,12 +1,12 @@
/**
* Authors:
* $(LINK2 https://github.com/MyLittleRobo, Roman Chistokhodov).
* $(LINK2 https://github.com/MyLittleRobo, Roman Chistokhodov)
* Copyright:
* Roman Chistokhodov, 2015
* License:
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* See_Also:
* $(LINK2 http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html, Icon Theme Specification).
* $(LINK2 http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html, Icon Theme Specification)
*/

module icontheme;
Expand Down Expand Up @@ -286,6 +286,13 @@ final class IconThemeFile : IniLikeFile
return std.algorithm.splitter(values, ',').filter!(s => s.length != 0);
}

///
unittest
{
assert(equal(IconThemeFile.splitValues("16x16/actions,16x16/animations,16x16/apps"), ["16x16/actions", "16x16/animations", "16x16/apps"]));
assert(IconThemeFile.splitValues(",").empty);
}

/**
* Join range of multiple values into a string using comma as separator.
* If range is empty, then the empty string is returned.
Expand All @@ -300,6 +307,13 @@ final class IconThemeFile : IniLikeFile
}
}

///
unittest
{
assert(equal(IconThemeFile.joinValues(["16x16/actions", "16x16/animations", "16x16/apps"]), "16x16/actions,16x16/animations,16x16/apps"));
assert(IconThemeFile.joinValues([""]).empty);
}

/**
* List of subdirectories for this theme.
* Returns: The range of multiple values associated with "Directories" key.
Expand Down Expand Up @@ -341,13 +355,9 @@ private:
IniLikeGroup _iconTheme;
}

///
unittest
{
assert(equal(IconThemeFile.splitValues("16x16/actions,16x16/animations,16x16/apps"), ["16x16/actions", "16x16/animations", "16x16/apps"]));
assert(IconThemeFile.splitValues(",").empty);
assert(equal(IconThemeFile.joinValues(["16x16/actions", "16x16/animations", "16x16/apps"]), "16x16/actions,16x16/animations,16x16/apps"));
assert(IconThemeFile.joinValues([""]).empty);

string indexThemeContents =
`[Icon Theme]
Name=Hicolor
Expand Down

0 comments on commit a9b0160

Please sign in to comment.