From 0b9109420677992942db080f5ff84ab2aab48839 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sun, 7 Jul 2019 18:42:24 +0200 Subject: [PATCH] :bug: Fix comments (and add tests) --- ast | 2 +- help/lcov.sh | 49 --------------------------- tests/error/malformed_hex_escape.gw | 2 ++ tests/error/malformed_octal_escape.gw | 2 ++ tests/tree/comment.gw | 1 + tests/tree/known_escape.gw | 1 + tests/tree/non_octal_escape.gw | 1 + tests/tree/wellformed_hex_escape.gw | 1 + tests/tree/wellformed_octal_escape.gw | 1 + 9 files changed, 10 insertions(+), 50 deletions(-) delete mode 100644 help/lcov.sh create mode 100644 tests/error/malformed_hex_escape.gw create mode 100644 tests/error/malformed_octal_escape.gw create mode 100644 tests/tree/comment.gw create mode 100644 tests/tree/known_escape.gw create mode 100644 tests/tree/non_octal_escape.gw create mode 100644 tests/tree/wellformed_hex_escape.gw create mode 100644 tests/tree/wellformed_octal_escape.gw diff --git a/ast b/ast index 1b4487bf..7594db9f 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 1b4487bfbb845050d0b5c0ed1a1564c9edf4f7ec +Subproject commit 7594db9ff91af21530f6cfc4b4a5c0a583b9adae diff --git a/help/lcov.sh b/help/lcov.sh deleted file mode 100644 index 539768c1..00000000 --- a/help/lcov.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -OUTFILE=lcov/lcov.info - -[ -d lcov ] || mkdir lcov - -lcov --no-external --capture --directory src --output-file "$OUTFILE" - -[ -z "$TRAVIS_BUILD_DIR" ] || { - coveralls-lcov lcov/lcov.info - exit -} - -genhtml -q -s -t "Gwion: coverage" -o lcov --precision 2 $OUTFILE - -keyboard_cb() { -cat << EOF > lcov/helper_gcov.js -var i = 1; -var cusid_ele = document.getElementsByClassName('$1'); -function keyDownTextField(e) { -var keyCode = e.keyCode; - if(keyCode==78) { - var item = cusid_ele[i]; - cusid_ele[i].scrollIntoView(); - i++; - } else if(keyCode==66){ - i--; - var item = cusid_ele[i]; - cusid_ele[i].scrollIntoView(); - } - if(i < 1) i = 1; - var size = cusid_ele.length - 1; - if(i > size) i = size; -} -document.addEventListener("keydown", keyDownTextField, false); -EOF -} - -keyboard_cb 'LineNoCov' -keyboard_cb 'coverFnLo' - -for file in lcov/**/*.c.gcov.html -do sed -i 's//