<commit_before>﻿using System.Collections.Generic;
using NUnit.Framework;

namespace DocoptNet.Tests
{
    [TestFixture]
    public class DefaultValueForPositionalArgumentsTests
    {
        // disabled right now
        [Test]
        public void Expect_none()
        {
            var expected = new Dictionary<string, ValueObject>
                {
                    {"<p>", null}
                };
            var actual = new Docopt().Apply("usage: prog [<p>]\n\n<p>  [default: x]", "");
            Assert.AreEqual(expected, actual);
        }

        [Test]
        public void Expect_empty_collection()
        {
            var expected = new Dictionary<string, ValueObject>
                {
                    {"<p>", new ValueObject(new string[0])}
                };
            var actual = new Docopt().Apply("usage: prog [<p>]...\n\n<p>  [default: x y]", "");
            Assert.AreEqual(expected, actual);
        }

        [Test]
        public void Expect_one_arg()
        {
            var expected = new Dictionary<string, ValueObject>
                {
                    {"<p>", new ValueObject(new[] {"this"})}
                };
            var actual = new Docopt().Apply("usage: prog [<p>]...\n\n<p>  [default: x y]", "this");
            Assert.AreEqual(expected, actual);
        }
    }
}<commit_msg>Port python Pull Request docopt/docopt#159<commit_after>﻿using System.Collections.Generic;
using NUnit.Framework;

namespace DocoptNet.Tests
{
    [TestFixture]
    public class DefaultValueForPositionalArgumentsTests
    {
        [Test]
        public void Expect_default_value()
        {
            var expected = new Dictionary<string, ValueObject>
                {
                    {"--data", new ValueObject(new[] {"x"})}
                };
            var actual = new Docopt().Apply("Usage: prog [--data=<data>...]\n\nOptions:\n\t-d --data=<arg>    Input data [default: x]", "");
            Assert.AreEqual(expected, actual);
        }

        [Test]
        public void Expect_default_collection()
        {
            var expected = new Dictionary<string, ValueObject>
                {
                    {"--data", new ValueObject(new string[] {"x", "y"})}
                };
            var actual = new Docopt().Apply("Usage: prog [--data=<data>...]\n\n         Options:\n\t-d --data=<arg>    Input data [default: x y]", "");
            Assert.AreEqual(expected, actual);
        }

        [Test]
        public void Expect_one_arg()
        {
            var expected = new Dictionary<string, ValueObject>
                {
                    {"--data", new ValueObject(new[] {"this"})}
                };
            var actual = new Docopt().Apply("Usage: prog [--data=<data>...]\n\n         Options:\n\t-d --data=<arg>    Input data [default: x y]", "--data=this");
            Assert.AreEqual(expected, actual);
        }
    }
}
{'fraction_non_alphanumeric': 0.14379310344827587, 'fraction_numerical': 0.001379310344827586, 'mean_word_length': 1.630099728014506, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1692532', 'n_tokens_mistral': 817, 'n_tokens_neox': 782, 'n_words': 182}