#!/usr/bin/python2
# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2014 University of Arizona
# Author: Yi Huang <ltr120@email.arizona.edu>
# See COPYING for copyright and distribution information.
#

import os
import unittest
import subprocess

class test_unixface(unittest.TestCase):
    """Test case for testing unix face"""

    def setUp(self):
        print "\nTesting unix face"
        print "*****************************"
        os.chdir("test_unixface")

    def tearDown(self):
        print "*****************************"
        os.chdir("..")

    def test_unixface(self):
        ret = subprocess.call(["./unix-face-test.sh"], shell=True)
        print "Test script return value:", ret
        errormsg = {
            1 : "ndn-traffic client does not end normally. See logs/client.log",
            2 : "Data loss detected",
        }
        if (ret != 0):
            self.fail(errormsg[ret])
