<commit_before>TEST 'FORM', (ok) ->

	form = undefined
	input = undefined

	div = DIV(
		style:
			position: 'fixed'
			left: 40
			top: 40
			backgroundColor: 'red'
			padding: 20
			margin: 0
	, ->
		form = FORM ->
			DIV ->
				H5 ->
					'Name'
				input = INPUT name: 'name'
			DIV
				style:
					marginTop: 10
			, ->
				H5 ->
					'Gender'
				SELECT
					name: 'gender'
				, ->
					OPTION
						value: 'male'
					, ->
						'Male'
					OPTION
						value: 'female'
					, ->
						'Female'
			DIV
				style:
					marginTop: 10
			, ->
				H5 ->
					'Age'
				INPUT name: 'age'
			DIV
				style:
					marginTop: 10
			, ->
				H5 ->
					'Profile'
				TEXTAREA name: 'profile'
	).appendTo BODY

	form.setData
		name: 'SYJ'
		gender: 'male'
		age: 26
		profile: 'Young man.'

	ok CHECK_ARE_SAME [
		form.getData()
		{
			name: 'SYJ'
			gender: 'male'
			age: '26'
			profile: 'Young man.'
		}
	] is true

	ok input.getValue() is 'SYJ'
	
	# remove div after 3 seconds.
	DELAY 3, ->
		div.remove()<commit_msg>change tap to 2 space<commit_after>TEST 'FORM', (ok) ->

  form = undefined
  input = undefined

  div = DIV(
    style:
      position: 'fixed'
      left: 40
      top: 40
      backgroundColor: 'red'
      padding: 20
      margin: 0
  , ->
    form = FORM ->
      DIV ->
        H5 ->
          'Name'
        input = INPUT name: 'name'
      DIV
        style:
          marginTop: 10
      , ->
        H5 ->
          'Gender'
        SELECT
          name: 'gender'
        , ->
          OPTION
            value: 'male'
          , ->
            'Male'
          OPTION
            value: 'female'
          , ->
            'Female'
      DIV
        style:
          marginTop: 10
      , ->
        H5 ->
          'Age'
        INPUT name: 'age'
      DIV
        style:
          marginTop: 10
      , ->
        H5 ->
          'Profile'
        TEXTAREA name: 'profile'
  ).appendTo BODY

  form.setData
    name: 'SYJ'
    gender: 'male'
    age: 26
    profile: 'Young man.'

  ok CHECK_ARE_SAME [
    form.getData()
    {
      name: 'SYJ'
      gender: 'male'
      age: '26'
      profile: 'Young man.'
    }
  ] is true

  ok input.getValue() is 'SYJ'
  
  # remove div after 3 seconds.
  DELAY 3, ->
    div.remove()
{'fraction_non_alphanumeric': 0.12649270234409554, 'fraction_numerical': 0.020787262273330383, 'mean_word_length': 1.312883435582822, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, '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': '6328299', 'n_tokens_mistral': 1023, 'n_tokens_neox': 792, 'n_words': 211}