<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using ServiceStack.Common;
using ServiceStack.Net30;
using ServiceStack.Text;

namespace ServiceStack.Redis.Tests
{
    [TestFixture, Category("Integration")]
    public class RedisClientEvalTests : RedisClientTestsBase
    {
        public override void OnBeforeEachTest()
        {
            //base.OnBeforeEachTest();

            //Run on local build server
            Redis = new RedisClient("192.168.2.16");
            Redis.FlushAll();
        }

        [Test]
        public void Can_Eval_int()
        {
            var intVal = Redis.ExecLuaAsInt("return 3141591");
            Assert.That(intVal, Is.EqualTo(3141591));
        }

        [Test]
        public void Can_EvalSha_int()
        {
            var luaBody = "return 3141591";
            Redis.ExecLuaAsInt(luaBody);
            var sha1 = Redis.CalculateSha1(luaBody);
            var intVal = Redis.ExecLuaShaAsInt(sha1);
            Assert.That(intVal, Is.EqualTo(3141591));
        }

        [Test]
        public void Can_Eval_int_with_args()
        {
            var intVal = Redis.ExecLuaAsInt("return 3141591", "20", "30", "40");
            Assert.That(intVal, Is.EqualTo(3141591));<commit_msg>Changing to use TestConfig for IP address<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using ServiceStack.Common;
using ServiceStack.Net30;
using ServiceStack.Text;

namespace ServiceStack.Redis.Tests
{
    [TestFixture, Category("Integration")]
    public class RedisClientEvalTests : RedisClientTestsBase
    {
        public override void OnBeforeEachTest()
        {
            //base.OnBeforeEachTest();

            //Run on local build server
            Redis = new RedisClient(TestConfig.SingleHost);
            Redis.FlushAll();
        }

        [Test]
        public void Can_Eval_int()
        {
            var intVal = Redis.ExecLuaAsInt("return 3141591");
            Assert.That(intVal, Is.EqualTo(3141591));
        }

        [Test]
        public void Can_EvalSha_int()
        {
            var luaBody = "return 3141591";
            Redis.ExecLuaAsInt(luaBody);
            var sha1 = Redis.CalculateSha1(luaBody);
            var intVal = Redis.ExecLuaShaAsInt(sha1);
            Assert.That(intVal, Is.EqualTo(3141591));
        }

        [Test]
        public void Can_Eval_int_with_args()
        {
            var intVal = Redis.ExecLuaAsInt("return 3141591", "20", "30", "40");
            Assert.That(intVal, Is.EqualTo(3141591));
{'fraction_non_alphanumeric': 0.10272134917592947, 'fraction_numerical': 0.04407819087773093, 'mean_word_length': 2.2024539877300615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5213256', 'n_tokens_mistral': 858, 'n_tokens_neox': 786, 'n_words': 157}