#!/usr/bin/env qore
# -*- mode: qore; indent-tabs-mode: nil -*-

%new-style
%enable-all-warnings
%require-types
%strict-args

%requires ../../../../qlib/QUnit.qm

%exec-class OctalConstTest

class OctalConstTest inherits QUnit::Test {
    constructor() : QUnit::Test("Octal constant test", "1.0") {
        addTestCase("Test", \test());
        set_return_value(main());
    }

    test() {
        assertEq("6", "\066", "\\066 is 6");
        assertEq("866", "\866", "\\866 is 866 - just escaped 8");
        assertEq("6", "\66", "\\66 is 6");
        assertEq("68", "\668", "\\66 and 8 is 68");
    }
}

