diff options
author | Mattias Andrée <maandree@kth.se> | 2017-10-13 19:07:57 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2017-10-13 19:07:57 +0200 |
commit | 76485979dd99159f032b35a4bf87cb0b8ed4c87d (patch) | |
tree | c207ff5fcef5a71a3407b0121bbc19a30d70248f /test.sh | |
parent | Rewrite with style (and relicense) (diff) | |
download | adjbacklight-76485979dd99159f032b35a4bf87cb0b8ed4c87d.tar.gz adjbacklight-76485979dd99159f032b35a4bf87cb0b8ed4c87d.tar.bz2 adjbacklight-76485979dd99159f032b35a4bf87cb0b8ed4c87d.tar.xz |
Add test8.0.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rwxr-xr-x | test.sh | 50 |
1 files changed, 50 insertions, 0 deletions
@@ -0,0 +1,50 @@ +#!/bin/sh + +set -v +set -e + +if test -d .testdir; then + rm -r .testdir +fi + +mkdir -p .testdir/dev +printf '%i\n' 50 > .testdir/dev/max_brightness +printf '%i\n' 25 > .testdir/dev/brightness + +test $(./test -ga) = 50.00% +test $(./test -g dev) = 50.00% + +./test -s +30 dev +test $(./test -ga) = 100.00% + +./test -s 5 dev +test $(./test -ga) = 10.00% + +./test -s -1 dev +test $(./test -ga) = 8.00% + +./test -s +100%% dev +test $(./test -ga) = 16.00% + +./test -s -50%% dev +test $(./test -ga) = 8.00% + +./test -s 200%% dev +test $(./test -ga) = 16.00% + +./test -s 50% dev +test $(./test -ga) = 50.00% + +./test -s -10% dev +test $(./test -ga) = 40.00% + +./test -s +20% dev +test $(./test -ga) = 60.00% + +mkdir .testdir/acpi_videox +printf '%i\n' 50 > .testdir/acpi_videox/max_brightness +printf '%i\n' 25 > .testdir/acpi_videox/brightness + +test $(./test -g) = 50.00% + +rm -r .testdir |